[erlang-bugs] Native compilation hangs with rm-reverse-eta-conversion

Kostis Sagonas kostis@REDACTED
Sun Jan 20 09:30:22 CET 2013


On 01/19/2013 04:24 PM, Anthony Ramine wrote:
> Apparently, this bug is related to concurrent_comp, as the following
> won't hang forever:
>
> 	erlc +'{hipe, [{concurrent_comp, false}]}' +native blah.erl

I also noticed that the commits which were pushed on 'master' make 
native code compilation hang.  Everything worked well before that.

If it's of any help, what concurrent_comp does, which the native code 
compiler does not do when this option is off, is to analyze the code of 
all functions and funs in order to find detailed type information. It 
does this in a concurrent fashion (i.e. spawns one process per strongly 
connected component/function) hence the option name.

The following is just a guess, but I suspect that your patch either 
broke a bytecode invariant that the hipe type analyzer relied on (in 
which case your code needs to respect this invariant), or generated code 
which is OK but it's code that had never been tested before (so it's a 
bug in the analysis of the native code compiler)

Hope this helps,
Kostis

> On Sat, Jan 19, 2013 at 2:27 PM, Anthony Ramine<n.oxyde@REDACTED>  wrote:
>> Hi,
>>
>> A bug was found by Tuncer Ayaz last week and I managed to reproduce it
>> and find where does it come from.
>>
>> Building this module on latest master with +native hangs forever:
>>
>>          -module(blah).
>>          -compile(export_all).
>>          foo(T) ->  lists:all(fun foo/1, T).
>>
>> Replacing "fun foo/1" by "fun (X) ->  foo(X) end" makes the compilation
>> succeed, so I'm convinced it comes from my patch
>> rm-reverse-eta-conversion.
>>
>> I'll look for a fix until code freeze, otherwise the patch will have
>> to be reverted.
>>
>> Regards,
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs




More information about the erlang-bugs mailing list