Closed
Bug 747322
Opened 13 years ago
Closed 13 years ago
jemalloc crashes during malloc_init_hard on s390x
Categories
(Core :: Memory Allocator, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: glandium, Unassigned)
Details
Attachments
(1 file)
483 bytes,
patch
|
justin.lebar+bug
:
review+
|
Details | Diff | Splinter Review |
S390 syscall interface doesn't support passing more than 5 arguments, so instead of giving the 6 arguments required for SYS_mmap, it gives one that is a pointer to a struct containing the arguments. The implementation I dif for s390 works fine on s390, but doesn't work on s390x because of expected padding: the arguments in the struct are all expected by the kernel to be 64-bits. So what happens next is that the syscall returns us a NULL pointer, and jemalloc initialization uses that pointer assuming it's not NULL, and dereferences it. Kaboom.
The patch solves the issue by using the "long" type instead of int, which happens to be the right size on both s390 and s390x. As a matter of fact, that's the type used in the kernel source itself (even for pointer members). The kernel actually uses unsigned long, but sign doesn't matter here.
Attachment #616908 -
Flags: review?(justin.lebar+bug)
Updated•13 years ago
|
Attachment #616908 -
Flags: review?(justin.lebar+bug) → review+
Reporter | ||
Comment 1•13 years ago
|
||
Had forgotten to update this bug:
http://hg.mozilla.org/mozilla-central/rev/bd9cdcd353e6
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in
before you can comment on or make changes to this bug.
Description
•