Erlang segfaults in beam/erl_bestfit_alloc.c:654
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
erlang (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: erlang-base
$ gdb /usr/lib/
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://
Reading symbols from /usr/lib/
symbols
from /usr/lib/
done.
(gdb) r
Starting program: /usr/lib/
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
aobf_get_free_block (allctr=0x8201000, size=88144, cand_blk=0x0,
cand_size=0) at beam/erl_
654 beam/erl_
in beam/erl_
(gdb) q
A debugging session is active.
Inferior 1 [process 1750] will be killed.
Quit anyway? (y or n) y
$ apt-cache
policy /usr/lib/
W: Unable to locate package /usr/lib/
helga@helga:~$ dpkg -S /usr/lib/
erlang-base-hipe: /usr/lib/
helga@helga:~$ apt-cache policy erlang-base-hipe
erlang-base-hipe:
Installed: 1:13.b.
Candidate: 1:13.b.
Version table:
*** 1:13.b.
500 http://
100 /var/lib/
This happened with both erlang-base and erlang-base-hipe.
I suspect that value 0x0 is not correct for cand_blk?
This is the code where the segfault happens: free_block( Allctr_ t *allctr, Uint size,
Block_ t *cand_blk, Uint cand_size)
static Block_t *
aobf_get_
{
BFAllctr_t *bfallctr = (BFAllctr_t *) allctr;
RBTree_t *x = bfallctr->root;
RBTree_t *blk = NULL;
Uint blk_sz;
ASSERT( !cand_blk || cand_size >= size);
while (x) {
blk_sz = BLK_SZ(x);
if (blk_sz < size) {
x = x->right;
}
else {
blk = x;
x = x->left;
}
}
if (!blk)
return NULL;
#ifdef HARD_DEBUG bfallctr, size));
ASSERT(blk == check_tree(
#endif
if (cand_blk) {
blk_sz = BLK_SZ(blk);
if (cand_size < blk_sz)
return NULL; /* cand_blk was better */
if (cand_size == blk_sz && ((void *) cand_blk) < ((void *) blk))
return NULL; /* cand_blk was better */
}
aobf_ unlink_ free_block( allctr, (Block_t *) blk);
return (Block_t *) blk;
}