Errors raised by evaluating a CGC in interactive are not caught
Bug #697929 reported by
Matt Giuca
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Fix Released
|
High
|
Matt Giuca |
Bug Description
Given the program:
def undefined :: a = error("Undefined")
Type at the interactive prompt:
?> undefined
Uncaught Mercury exception:
mars_error(
(Mars terminates)
Expected behaviour:
Runtime Error: Undefined
(Mars prompt resumes)
In the LLVM backend, this same scenario results in a segfault by dereferencing NULL.
Related branches
Changed in mars: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hm. It looks like this bug was fixed (or at least, that particular example, disregarding the LLVM backend) in trunk r1184 (merge from branch separate-globals) as part of fixing bug #699721. In that branch, the entire framework for calling CGCs changed (no longer calls them implicitly when mentioning a varname; there is an explicit ld_cgc instruction to call them), so it is not surprising that this accidentally got fixed.
(The bug was probably due to the implicit mention of a variable not being surrounded by a try.)