[m-users.] Compiler Runtime Error
Charlie McGee
c4cypher at gmail.com
Sat Aug 30 10:05:38 AEST 2014
Okay, I'm still going through it all, I'm just floored that I got mmc to
spit out a runtime error.
Making
Mercury/asm_fast.gc.trseg.debug.stseg/x86_64-pc-linux-gnu/Mercury/cs/luaMR.state.c
Uncaught Mercury exception:
Software Error: hlds.instmap: predicate
`hlds.instmap.instmapping_set_vars_corresponding'/4: Unexpected: not_reached
Here's a pastebin of the source I was working on:
http://pastebin.com/Z6Fau9b3
The lines that I was editing (trying to get the switch to infer as det)
when mmc started to throw exceptions are 682 - 684. The entire clause is
pasted for convenience.
lua_pcall(L, A) = R :-
impure Result = lua_pcall(L, A, 0),
( Result = returned(R) % line 682
; Result = returned_error(Error), throw(Error)
; unexpected($module, $pred, "Invalid result value. (WTF?)") % line 684
).
Using if-> calls rather than raw disjuncts originally triggered this. I'm
going to be focusing on trying to re-arrange this clause in a manner that
does not cause mmc to toss cookies.
I've located the exception I've triggered in the source, instmap.m line
600, although I don't know the inner workings of the compiler to begin
knowing how to interpret it.
expect(negate(unify(Inst, not_reached)), $module, $pred, "not_reached"),
I'm not asking for or expecting any kind of specific assistance or
response, I'll be trying to bypass this by trial and error, I figured that
this was the kind of thing that would be productive to bring attention to
as a bug report, not that I have a clue to what is causing it. I believe
this is my first post to the list, you guys have been awesome on #mercury.
I want to do everything I can to support both this community and the
development of this language.
Note: I also compiled the same code under asm_fast.gc.trseg and got the
same response.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20140829/d4a4175a/attachment.html>
More information about the users
mailing list