| Author |
Message |
|
| Guest |
Posted: Thu Jul 22, 2010 4:21 pm |
|
|
|
Guest
|
Hello,
I am experiencing a strange error when compiling with +native the following module:
----------------------------
-module(hipe_crash).
-export([f/6]).
f(A, B, C, D, E, L) ->
lists:foldl(fun (X, P) ->
AVar = case A of
0 -> 1 / D;
N -> N / (C - B)
end,
BVar = case E of
atom1 -> 1.0;
atom2 -> 0.8;
_ -> E
end,
CVar = case X of
atom1 -> 0.1 * AVar;
_ -> 1.0
end,
P * BVar * CVar
end, 1, L).
----------------------------
I couldn't restrict the code further. For example, the error does not happen without the atom2 case line for BVar.
With +native, I get:
=ERROR REPORT==== 22-Jul-2010::18:17:53 ===
<HiPE (v 3.7.6)> Error: [hipe:867]: ERROR: {function_clause,
[{proplists,get_bool,2},
{global_group,
global_groups_removed,1}]}
=ERROR REPORT==== 22-Jul-2010::18:17:53 ===
Error in process <0.30.0> with exit value: {{hipe,868,{function_clause,[{proplists,get_bool,2},{global_group,global_groups_removed,1}]}},[{hipe,finalize_fun_sequential,3},{hipe,'-finalize_fun_concurrent/3-fun-3-',4}]}
/Junk/tmp/hipe_crash.erl:none: internal error in native_compile;
crash reason: {{hipe,868,
{function_clause,
[{proplists,get_bool,2},
{global_group,global_groups_removed,1}]}},
[{hipe,finalize_fun_sequential,3},
{hipe,'-finalize_fun_concurrent/3-fun-3-',4}]}
With +native +'{hipe, [verbose]}', I get:
<HiPE (v 3.7.6)> EXITED with reason {function_clause,[{hipe_icode_fp,assert_assigned,[[{30,{icode_variable,40,fvar,[]}}]]},{hipe_icode_fp,bindings_are_assigned,1},{hipe_icode_fp,filter_map,3},{hipe_icode_fp,transform_block,2},{hipe_icode_fp,cfg,1},{hipe_main,icode_ssa_type,4},{hipe_main,icode_ssa,4},{hipe_main,compile_icode,5}]} @hipe:868
=ERROR REPORT==== 22-Jul-2010::18:17:13 ===
<HiPE (v 3.7.6)> Error: [hipe:867]: ERROR: {function_clause,
[{hipe_icode_fp,assert_assigned,
[[{30,
{icode_variable,40,fvar,
[]}}]]},
{hipe_icode_fp,
bindings_are_assigned,1},
{hipe_icode_fp,filter_map,3},
{hipe_icode_fp,transform_block,2},
{hipe_icode_fp,cfg,1},
{hipe_main,icode_ssa_type,4},
{hipe_main,icode_ssa,4},
{hipe_main,compile_icode,5}]}
/Junk/tmp/hipe_crash.erl:none: internal error in native_compile;
crash reason: {{hipe,868,
{function_clause,
[{hipe_icode_fp,assert_assigned,
[[{30,{icode_variable,40,fvar,[]}}]]},
{hipe_icode_fp,bindings_are_assigned,1},
{hipe_icode_fp,filter_map,3},
{hipe_icode_fp,transform_block,2},
{hipe_icode_fp,cfg,1},
{hipe_main,icode_ssa_type,4},
{hipe_main,icode_ssa,4},
{hipe_main,compile_icode,5}]}},
[{hipe,finalize_fun_sequential,3},
{hipe,'-finalize_fun_concurrent/3-fun-3-',4}]}
This is with an R14A OTP installation configured with --enable-native-libs.
Any idea?
Paul
--
Semiocast http://semiocast.com/
+33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Jul 23, 2010 10:59 am |
|
|
|
Guest
|
Paul Guyot writes:
> Hello,
>
> I am experiencing a strange error when compiling with +native the following module:
>
> ----------------------------
> -module(hipe_crash).
> -export([f/6]).
>
> f(A, B, C, D, E, L) ->
> lists:foldl(fun (X, P) ->
> AVar = case A of
> 0 -> 1 / D;
> N -> N / (C - B)
> end,
> BVar = case E of
> atom1 -> 1.0;
> atom2 -> 0.8;
> _ -> E
> end,
> CVar = case X of
> atom1 -> 0.1 * AVar;
> _ -> 1.0
> end,
> P * BVar * CVar
> end, 1, L).
> ----------------------------
>
> I couldn't restrict the code further. For example, the error does not happen without the atom2 case line for BVar.
>
> With +native, I get:
>
> =ERROR REPORT==== 22-Jul-2010::18:17:53 ===
> <HiPE (v 3.7.6)> Error: [hipe:867]: ERROR: {function_clause,
> [{proplists,get_bool,2},
> {global_group,
> global_groups_removed,1}]}
>
> =ERROR REPORT==== 22-Jul-2010::18:17:53 ===
> Error in process <0.30.0> with exit value: {{hipe,868,{function_clause,[{proplists,get_bool,2},{global_group,global_groups_removed,1}]}},[{hipe,finalize_fun_sequential,3},{hipe,'-finalize_fun_concurrent/3-fun-3-',4}]}
>
> /Junk/tmp/hipe_crash.erl:none: internal error in native_compile;
> crash reason: {{hipe,868,
> {function_clause,
> [{proplists,get_bool,2},
> {global_group,global_groups_removed,1}]}},
> [{hipe,finalize_fun_sequential,3},
> {hipe,'-finalize_fun_concurrent/3-fun-3-',4}]}
>
> With +native +'{hipe, [verbose]}', I get:
>
> <HiPE (v 3.7.6)> EXITED with reason {function_clause,[{hipe_icode_fp,assert_assigned,[[{30,{icode_variable,40,fvar,[]}}]]},{hipe_icode_fp,bindings_are_assigned,1},{hipe_icode_fp,filter_map,3},{hipe_icode_fp,transform_block,2},{hipe_icode_fp,cfg,1},{hipe_main,icode_ssa_type,4},{hipe_main,icode_ssa,4},{hipe_main,compile_icode,5}]} @hipe:868
>
> =ERROR REPORT==== 22-Jul-2010::18:17:13 ===
> <HiPE (v 3.7.6)> Error: [hipe:867]: ERROR: {function_clause,
> [{hipe_icode_fp,assert_assigned,
> [[{30,
> {icode_variable,40,fvar,
> []}}]]},
> {hipe_icode_fp,
> bindings_are_assigned,1},
> {hipe_icode_fp,filter_map,3},
> {hipe_icode_fp,transform_block,2},
> {hipe_icode_fp,cfg,1},
> {hipe_main,icode_ssa_type,4},
> {hipe_main,icode_ssa,4},
> {hipe_main,compile_icode,5}]}
> /Junk/tmp/hipe_crash.erl:none: internal error in native_compile;
> crash reason: {{hipe,868,
> {function_clause,
> [{hipe_icode_fp,assert_assigned,
> [[{30,{icode_variable,40,fvar,[]}}]]},
> {hipe_icode_fp,bindings_are_assigned,1},
> {hipe_icode_fp,filter_map,3},
> {hipe_icode_fp,transform_block,2},
> {hipe_icode_fp,cfg,1},
> {hipe_main,icode_ssa_type,4},
> {hipe_main,icode_ssa,4},
> {hipe_main,compile_icode,5}]}},
> [{hipe,finalize_fun_sequential,3},
> {hipe,'-finalize_fun_concurrent/3-fun-3-',4}]}
>
> This is with an R14A OTP installation configured with --enable-native-libs.
>
> Any idea?
Confirmed. You don't need --enable-native-libs, an R14A built without
that option fails in the same way.
You can work around it by adding the HiPE option no_inline_fp.
/Mikael
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|