Last Comment Bug 657528 - Use a volatile pointer to force a trap.
: Use a volatile pointer to force a trap.
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla6
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-16 17:18 PDT by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2011-05-17 06:39 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use a volatile pointer to force a trap. (1.07 KB, patch)
2011-05-16 17:18 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
ehsan: review+
Details | Diff | Review
Updated patch. (1.12 KB, patch)
2011-05-16 17:44 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
no flags Details | Diff | Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-05-16 17:18:54 PDT
Created attachment 532808 [details] [diff] [review]
Use a volatile pointer to force a trap.

Clang issues the warning:
    
mozalloc_abort.cpp:64:22: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
    
And sure enough, TouchBadMemory is currently broken with clang. That breaks mozalloc_abort which breaks NS_DebugBreak which breaks the crashreport test.
Comment 1 :Ehsan Akhgari (busy, don't ask for review please) 2011-05-16 17:41:27 PDT
Comment on attachment 532808 [details] [diff] [review]
Use a volatile pointer to force a trap.

r=me.

Nit: can you please fix the comment indentation?  Thanks!
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-05-16 17:44:01 PDT
Created attachment 532812 [details] [diff] [review]
Updated patch.
Comment 3 :Ehsan Akhgari (busy, don't ask for review please) 2011-05-16 18:07:09 PDT
http://hg.mozilla.org/projects/cedar/rev/7839f528cda0
Comment 4 :Ehsan Akhgari (busy, don't ask for review please) 2011-05-16 18:07:41 PDT
Man, I'm too used to landing stuff on m-c now!
Comment 5 Mounir Lamouri (:mounir) 2011-05-17 06:39:15 PDT
Pushed:
http://hg.mozilla.org/mozilla-central/rev/7839f528cda0

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