[erlang-bugs] HiPE crash with crypto and R14A

Paul Davis <>
Sat Jun 26 20:37:57 CEST 2010


On Sat, Jun 26, 2010 at 2:05 PM, Paul Guyot <> wrote:
> Hello,
>
> I noticed the following reproduceable crash (segment fault) on R14A with HiPE and crypto 2.0 on both MacOS X 64bits build and FreeBSD 64bits build. It may be related to the fact that crypto now uses NIF.
>
> hipe_crash.erl:
> ----
> -module(hipe_crash).
> -export([crash/0]).
>
> crash() ->
>    ok = application:start(crypto),
>    Stage1 = crypto:sha("test"),
>    crypto:sha(Stage1).
> ----
> erlc +native hipe_crash.erl
> erl -eval 'hipe_crash:crash()'
>
> Compiling without +native does not yield a crash.
>
> crypto:sha("test") is <<169,74,143,229,204,177,155,166,28,76,8,115,211,145,233,135,152,47,187,211>>, yet the following code does not crash :
>
>    ok = application:start(crypto),
>    crypto:sha(<<169,74,143,229,204,177,155,166,28,76,8,115,211,145,233,135,152,47,187,211>>).
>
> Regards,
>
> Paul
>
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>

Confirmed on Ubuntu 10.04 with R14A from source. I grabbed a backtrace
as well but it isn't very informative.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6484b70 (LWP 23582)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xb763b5a4 in ?? ()
#2  0xb74e82c4 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

HTH,
Paul Davis


More information about the erlang-bugs mailing list