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...
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86 Mac OS X
-- normal (vote)
: mozilla10
Assigned To: :Ehsan Akhgari
: Jet Villegas (:jet)
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

Description User image :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
    *(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:
Comment 1 User image :Ehsan Akhgari 2011-10-05 07:55:49 PDT
Created attachment 564853 [details] [diff] [review]
Patch (v1)
Comment 2 User image 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 User image 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 User image Ed Morley [:emorley] 2011-10-06 08:45:02 PDT

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