Closed Bug 836054 Opened 7 years ago Closed 7 years ago

DMD: Handle stack entries with PC of 0x0

Categories

(Core :: DMD, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: njn, Assigned: njn)

Details

Attachments

(1 file)

jst saw DMD crash with this stack trace:

#0  0x00007f9e633f9d8b in raise () from /lib64/libpthread.so.0
#1  0x00007f9e5e41435b in nsProfileLock::FatalSignalHandler (signo=11,
    info=<value optimized out>, context=<value optimized out>)
    at /home/jst/fast/work/tip/fb-rel/toolkit/profile/nsProfileLock.cpp:180
#2  <signal handler called>
#3  0x00007f9e6360b1a4 in mozilla::dmd::LocationService::WriteLocation (this=
    0x7f9da595b000, aWriter=..., aPc=0x0)
    at /home/jst/fast/work/tip/mozilla/memory/replace/dmd/DMD.cpp:703
#4  0x00007f9e6360b45d in mozilla::dmd::StackTrace::Print (this=
    0x7f9e322e6e20, aWriter=..., aLocService=0x7f9da595b000)

I think the aPc=0x0 is the problem;  WriteLocation has this assertion near the top:

    MOZ_ASSERT(aPc);    // important, because null represents an empty entry

Looks like I'll need a different value to represent an empty entry.  Maybe (void*)-1 will do.
Summary: Handle stack entries with PC of 0x0 → DMD: Handle stack entries with PC of 0x0
Attachment #707994 - Flags: review?(justin.lebar+bug)
Attachment #707994 - Flags: review?(justin.lebar+bug) → review+
https://hg.mozilla.org/mozilla-central/rev/7349207f0878
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.