Last Comment Bug 692109 - The intended crash in nsIFrame::GetOffsetToCrossDoc won't actually crash with some compilers
: The intended crash in nsIFrame::GetOffsetToCrossDoc won't actually crash with...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla10
Assigned To: :Ehsan Akhgari
:
Mentors:
Depends on:
Blocks: 621551
  Show dependency treegraph
 
Reported: 2011-10-05 07:54 PDT by :Ehsan Akhgari
Modified: 2011-10-06 08:45 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (1.34 KB, patch)
2011-10-05 07:55 PDT, :Ehsan Akhgari
tnikkel: review+
Details | Diff | Splinter Review

Description :Ehsan Akhgari 2011-10-05 07:54:14 PDT
/Users/ehsanakhgari/moz/mozilla-central/layout/generic/nsFrame.cpp:4077:5: warning: indirection of non-volatile null pointer will be deleted, not trap
      [-Wnull-dereference]
    *(static_cast<PRInt32*>(nsnull)) = 3;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ehsanakhgari/moz/mozilla-central/layout/generic/nsFrame.cpp:4077:5: note: consider using __builtin_trap() or qualifying pointer with 'volatile'
1 warning generated.

While this could be fixed by making the pointer volatile, we should really use NS_RUNTIMEABORT, which gives us nice crash signatures like this: https://crash-stats.mozilla.com/report/index/0f429455-ba92-4789-aa05-7984c2111005
Comment 1 :Ehsan Akhgari 2011-10-05 07:55:49 PDT
Created attachment 564853 [details] [diff] [review]
Patch (v1)
Comment 2 Timothy Nikkel (:tnikkel) 2011-10-05 10:43:30 PDT
Comment on attachment 564853 [details] [diff] [review]
Patch (v1)

I've pretty much got all the information I can from crashstats with this intended crash there and I still don't know how to fix the bug. I'm not sure how to proceed in fixing the main bug, whether it is better to leave the crash in or take it out.

Either way this is good.
Comment 3 Timothy Nikkel (:tnikkel) 2011-10-05 11:44:57 PDT
(And I haven't seen any more infinite recursion crash stacks, so we aren't missing any information that we could be getting if this was causing a problem.)
Comment 4 Ed Morley [:emorley] 2011-10-06 08:45:02 PDT
https://hg.mozilla.org/mozilla-central/rev/a16971b9a582

Note You need to log in before you can comment on or make changes to this bug.