segfault on exiting trivial program linked to dmalloc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dmalloc (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
see <http://<email address hidden>
This trivial program:
#include <dmalloc.h>
int main (int argc, char *argv[]) {
malloc(1);
return 0;
}
compiled with
gcc -o tst tst.c -ldmalloc
crashes on exit:
#5 0x00007ffff7af11fa in ?? () from /usr/lib/
#6 0x00007ffff7af1a72 in dmalloc_free () from /usr/lib/
#7 0x00007ffff7771ba4 in vfprintf () from /lib/x86_
#8 0x00007ffff7831580 in __vsnprintf_chk () from
/lib/x86_
#9 0x00007ffff7aebf7e in loc_vsnprintf () from /usr/lib/
#10 0x00007ffff7aec022 in loc_snprintf () from /usr/lib/
#11 0x00007ffff7af0c48 in _dmalloc_die () from /usr/lib/
#12 0x00007ffff7af11fa in ?? () from /usr/lib/
#13 0x00007ffff7af1a72 in dmalloc_free () from /usr/lib/
#14 0x00007ffff7771ba4 in vfprintf () from /lib/x86_
#15 0x00007ffff7831580 in __vsnprintf_chk () from
/lib/x86_
#16 0x00007ffff7aebf7e in loc_vsnprintf () from /usr/lib/
#17 0x00007ffff7aec022 in loc_snprintf () from /usr/lib/
I guess dmalloc is out of date with something that changed in libc.
I tested on Precise; apparently it is also broken on Oneiric.
The user reports upstream is unresponsive.
Perhaps dmalloc should be removed from Precise, if it's not too late?
Changed in dmalloc (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
The bug is related to the call to libc's vsnprintf in compat.c on line 145.. Commenting out all the calls to vsnprintf and leaving it to use the string copy works fine on the tests I have run.