Compiler crash with abstract modules...
Bjorn Gustavsson
bjorn@REDACTED
Tue Jan 11 16:30:31 CET 2005
Yes, interesting!
It would be useful if your example would have worked.
Unfortunately, it seems that it will not be that easy to make
it work, so we will probably eliminate the crash in a future
release by instead producing an error message.
/Bjorn
Mark Scandariato <mscandar@REDACTED> writes:
> Hi,
>
> Interesting crash when compiling the following snippet:
>
> %%%----------------------
> -module(foo, [N]).
> -compile(export_all).
>
> bug(<<V:N/unit:8>>) -> V.
> %%%----------------------
>
> This is equivalent to:
> %%%----------------------
> -module(foo).
> -compile(export_all).
>
> bug(<<V:N/unit:8>>, {foo, N}) -> V.
> %%%----------------------
>
> Which would normally just complain that "variable 'N' is unbound".
>
> Here's the crash:
>
> foo.erl:none: internal error in v3_codegen;
> crash reason: {{case_clause,{'EXIT',{function_clause,
> [{v3_codegen,fetch_stack,['N',[],0]},
> {v3_codegen,select_extract_bin,10},
> {v3_codegen,select_bin_seg,5},
> {v3_codegen,select_binary,6},
> {v3_codegen,match_cg,5},
> {v3_codegen,match_cg,6},
> {v3_codegen,
> '-cg_list/5-anonymous-0-',
> 3},
> {v3_codegen,flatmapfoldl,3},
> {v3_codegen,cg_list,5},
> {v3_codegen,cg_fun,4}]}}},
> [{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}]}
>
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list