Mercury Bugs - mercury
View Issue Details
0000283mercuryBugpublic2013-05-09 14:232022-02-05 15:10
Reporterjuliensf 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000283: Crash in erlang grade with io.call_system_return_signal
DescriptionWhen the test program for the JSON library at <https://github.com/juliensf/mercury-json> is built in the
erlang grade and run (i.e by doing make runtests), it results in the following abort:

{"init terminating in do_boot",{{badmatch,{"-n 0","\n"}},[{mercury__io,'-call_system_return_signal_4_p_0/1-fun-0-',1,[{file,"Mercury/erls/mercury__io.erl"},{line,5792}]},{mercury__io,call_system_return_signal_4_p_0,1,[{file,"Mercury/erls/mercury__io.erl"},{line,5778}]},{mercury__io,call_system_4_p_0,1,[{file,"Mercury/erls/mercury__io.erl"},{line,5749}]},{test_json,run_test_3_p_0,1,[{file,"Mercury/erls/test_json.erl"},{line,285}]},{test_json,'-main_2_p_0/0-fun-5-',2,[{file,"Mercury/erls/test_json.erl"},{line,190}]},{mercury__list,foldl_4_p_2,5,[{file,"Mercury/erls/mercury__list.erl"},{line,5455}]},{test_json,main_2_p_0,0,[{file,"Mercury/erls/test_json.erl"},{line,195}]},{test_json,mercury__main_wrapper,0,[{file,"Mercury/erls/test_json.erl"},{line,58}]}]}}
Steps To ReproduceThis is using OTP-R16B on Mac OS 10.8.3.
TagsNo tags attached.
Attached Files

Notes
(0000509)
wangp   
2013-05-10 10:46   
Adjust the hacky shell code on io.m:9742. The -n in "echo -n $?" is being printed literally.
(0000510)
juliensf   
2013-05-10 13:39   
It doesn't seem trivial to make it not print it literally :-( I'll leave this until after the 13.05 release -- the
existing code is not very portable anyway.
(0000511)
wangp   
2013-05-10 16:29   
Looks like you want to use open_port instead, e.g.
http://comments.gmane.org/gmane.comp.lang.erlang.general/20007
(0000512)
juliensf   
2013-05-10 16:30   
Yes, I also saw that thread.
(0001164)
juliensf   
2022-02-05 15:10   
The Erlang backend has been deleted.

Issue History
2013-05-09 14:23juliensfNew Issue
2013-05-10 10:46wangpNote Added: 0000509
2013-05-10 13:39juliensfNote Added: 0000510
2013-05-10 16:29wangpNote Added: 0000511
2013-05-10 16:30juliensfNote Added: 0000512
2022-02-05 15:10juliensfAssigned To => juliensf
2022-02-05 15:10juliensfStatusnew => closed
2022-02-05 15:10juliensfResolutionopen => no change required
2022-02-05 15:10juliensfNote Added: 0001164