Bugs with hibernate/3 and HiPE

Paul Guyot pguyot@REDACTED
Mon Sep 27 18:30:59 CEST 2010


Hello,

There are several bugs related to hibernate/3 BIF and HiPE:

1. erlang:hibernate/3 simply fails with badarg when called from HiPE.
2. erlang:hibernate/3 simply fails with badarg when called dynamically, in a way that the compiler and the loader cannot replace with the i_hibernate beam instruction.
3. There is a segfault in the garbage collector when calling erlang:hibernate/3 (from beam unless bug #1 is fixed) if the process went through HiPE. This is because erts_garbage_collect_hibernate would not clean up the hipe process state.

These bugs are highly related: 1 and 2 are actually the same bug (hibernate/3 BIF isn't implemented, and apparently wasn't since it was introduced), and 3 causes segfaults with any reasonable test once bug #1 is fixed.

The following patch fixes these issues:
http://github.com/pguyot/otp/commit/fcc005c8758d97d7f0c402bfffede0b22b8ab401
git fetch git://github.com/pguyot/otp.git fix-hibernate-with-hipe

Regards,

Paul
-- 
Semiocast                    http://semiocast.com/
+33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris



More information about the erlang-bugs mailing list