[erlang-bugs] Bug in HiPE compiled compiler

Adam Lindberg adam.lindberg@REDACTED
Tue Jul 6 18:32:04 CEST 2010


I managed to pinpoint the error to erl_parse. If you compile only erl_parse without hipe it works as it should.

Cheers,
Adam

----- "Kostis Sagonas" <kostis@REDACTED> wrote:

> Mikael Pettersson wrote:
> > Adam Lindberg writes:
> >  > Hi,
> >  > 
> >  > The following module produces a compiler error in R13B03 and
> R13B04:
> >  > 
> >  > -module(a).
> >  > f() -> hipe is broken.
> >  > 
> >  > 
> >  > The error is, just as expected:
> >  > $> erlc a.erl
> >  > a.erl:2: syntax error before: is
> >  > 
> >  > 
> >  > However, if the compiler is HiPE compiled (with
> NATIVE_LIBS_ENABLED=yes), the following error occurs:
> >  > 
> >  > $> erlc a.erl
> >  > a.erl:none: internal error in parse_module;
> >  > crash reason: {function_clause,[{erl_parse,yeccpars2_6,7},
> >  >                                 {erl_parse,yeccpars0,5},
> >  >                                 {epp,parse_file,1},
> >  >                                 {epp,parse_file,1},
> >  >                                 {epp,parse_file,3},
> >  >                                 {compile,parse_module,1},
> >  >                                
> {compile,'-internal_comp/4-anonymous-1-',2},
> >  >                                 {compile,fold_comp,3}]}
> > 
> > I can't reproduce this with R14A on i686-linux.
> > 
> > If you can still trigger the failure with R14A, please show us the
> > complete sequence of steps needed to reproduce it.
> 
> The behaviour is reproducible.
> 
> At least in my system that has kernel, stdlib, compiler and hipe all
> in 
> native code (configure --enable-native-libs) the following sequence of
> 
> commands shows the difference if one native compiles or not only one 
> specific file.
> 
> @hektor [~/.../otp] cd lib/stdlib/src
> @hektor [~/.../otp/lib/stdlib/src] erlc -W  +debug_info -I../include 
> -I../../kernel/include -o../ebin erl_parse.erl
> @hektor [~/.../otp/lib/stdlib/src] erlc a.erl
> ./a.erl:3: syntax error before: is
> @hektor [~/HiPE/otp/lib/stdlib/src] erlc -W  +debug_info +native 
> -I../include -I../../kernel/include -o../ebin erl_parse.erl
> @hektor [~/.../otp/lib/stdlib/src] erlc a.erl
> ./a.erl:none: internal error in parse_module;
> crash reason: {function_clause,[{erl_parse,yeccpars2_6,7},
>                                  {erl_parse,yeccpars0,5},
>                                  {epp,parse_file,1},
>                                  {epp,parse_file,1},
>                                  {epp,parse_file,3},
>                                  {compile,parse_module,1},
>  
> {compile,'-internal_comp/4-anonymous-1-',2},
>                                  {compile,fold_comp,3}]}
> 
> Kostis


More information about the erlang-bugs mailing list