<div dir="ltr">Messing around with my random program generator again I got the following message:<div><br></div><div><p style="margin:0px"><font face="monospace, monospace">1> c(bug).</font></p>
<p style="margin:0px"><font face="monospace, monospace">bug: function f/0+18:</font></p>
<p style="margin:0px"><font face="monospace, monospace">  Internal consistency check failed - please report this bug.</font></p>
<p style="margin:0px"><font face="monospace, monospace">  Instruction: {gc_bif,'+',{f,0},1,[{x,0},{atom,hockey}],{x,0}}</font></p>
<p style="margin:0px"><font face="monospace, monospace">  Error:       unknown_catch_try_state:</font></p></div><div><br></div><div>Here's the (somewhat contrived) program</div><div><br></div><div><div><font face="monospace, monospace">-module(bug).</font></div><div><font face="monospace, monospace">-compile(export_all).</font></div><div><font face="monospace, monospace">f() -></font></div><div><font face="monospace, monospace">  receive _ -> (b = fun() -> ok end)</font></div><div><font face="monospace, monospace">    + hockey, +x after 0 -> ok end, try (a = fun() -> ok end) + hockey, +</font></div><div><font face="monospace, monospace">    y catch _ -> ok end.</font></div></div><div><br></div><div>There are a number of intriguing things here</div><div><br></div><div>- Breaking the 'hockey' line anywhere gets rid of the bug(!!).</div><div>- The two 'hockey' atoms need to be the same (but not necessarily sports related).<br></div><div><div>- I tried reasonably hard to make the program smaller, but failed.</div></div><div><br></div><div>I get the same error on all distributions I tried (R14 up to R17.4.1). Master didn't build for me.</div><div><br></div><div>/ Ulf</div></div>