[erlang-bugs] R13A Internal compiler error when using a record in a guard within a try/catch block

David Sveningsson ext@REDACTED
Thu Apr 16 17:06:09 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bjorn Gustavsson wrote:
> On Thu, Apr 16, 2009 at 2:40 PM, David Sveningsson <ext@REDACTED> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi, when compiling the attached code with R13A erlc the compiler crashes
>> with the following error:
>>
>> Function: do_stuff/1
>> temp/test.erl:none: internal error in v3_codegen;
>> crash reason: {{case_clause,
>>                   {'EXIT',
>>                       {function_clause,
>>                           [{v3_codegen,longest,[[{ker0}],[]]},
>>                            {v3_codegen,longest,2},
>>                            {v3_codegen,sr_merge,2},
>>                            {v3_codegen,match_cg,5},
>>                            {v3_codegen,guard_match_cg,6},
>>                            {v3_codegen,guard_cg,5},
>>                            {v3_codegen,'-guard_cg_list/6-anonymous-0-',4},
>>                            {v3_codegen,flatmapfoldl,3}]}}},
>>               [{compile,'-select_passes/2-anonymous-2-',2},
>>                {compile,'-internal_comp/4-anonymous-1-',2},
>>                {compile,fold_comp,3},
>>                {compile,internal_comp,4},
>>                {compile,internal,3}]}
>>
>> There are many ways to workaround this:
>>
>> * Removing the try/catch block.
>> * Putting the case block in a separate functions.
>> * Assigning Foo#foo.bar to a local variable and use in guard instead.
>>
>> Either way, the compiler shouldn't crash. It is possible that this issue
>> is already fixed as I've read some similar reports related to try/catch.
> 
> Yes, it shouldn't crash, and, yes, it has already been fixed. The correction
> will be included in the R13B release.
> 
> /Björn
> 

Ok, thanks!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknnSQAACgkQ6pa1H/H5pqVt4gCgnEfuEXzYeLQcZSQwFe96qZOa
ZBgAn3GGvzK39xMzi2b7WNSRpD0TAlTh
=MCnj
-----END PGP SIGNATURE-----



More information about the erlang-bugs mailing list