Last Comment Bug 707648 - make check fails on 10.6 with clang (Assertion failure: OnLionOrLater() || gCriticalAddress.mAddr != NULL)
: make check fails on 10.6 with clang (Assertion failure: OnLionOrLater() || gC...
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
Mentors:
Depends on:
Blocks: clang
  Show dependency treegraph
 
Reported: 2011-12-05 05:35 PST by Mark Banner (:standard8)
Modified: 2012-04-05 16:44 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Mozconfig (529 bytes, text/plain)
2011-12-05 06:09 PST, Mark Banner (:standard8)
no flags Details
Only try to init the critical range if we are able to walk the stack (1.04 KB, patch)
2011-12-05 19:12 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
ehsan: review+
lukasblakk+bugs: approval‑mozilla‑esr10-
respindola: checkin+
Details | Diff | Review
My mozilla-config.h (4.07 KB, text/plain)
2011-12-06 11:06 PST, :Ehsan Akhgari (busy, don't ask for review please)
no flags Details
My nsStackWalk.i (475.88 KB, text/plain)
2011-12-06 11:07 PST, :Ehsan Akhgari (busy, don't ask for review please)
no flags Details

Description Mark Banner (:standard8) 2011-12-05 05:35:58 PST
I'm trying to run make check in debug mode on Mac 10.6 with clang, I see this:

Assertion failure: OnLionOrLater() || gCriticalAddress.mAddr != NULL

If I run it in compiled with gcc I get no assertions. Commenting out the line on clang runs successfully.
Comment 1 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-05 05:58:53 PST
This blocks a switch to clang, not enabling leak tests on gcc built binaries.

I will debug this.
Comment 2 Mark Banner (:standard8) 2011-12-05 06:09:44 PST
Created attachment 579050 [details]
Mozconfig

This was the mozconfig I used for compiling TB.
Comment 3 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-05 08:03:34 PST
I have not been able to reproduce this on m-c. What repository are you using? what revision?
Comment 4 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-05 10:40:04 PST
Sorry, I am having a hard time reproducing this. I have built the same version of clang on 10.6 and tried you exact mozconfig on comm-central (cd77f678aa1c).

The only failures I got from make check were from bug529130.js complaining about too much recursion, which I believe is because clang -O0 produces binaries that use a lot of stack space.
Comment 5 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-05 19:12:31 PST
Created attachment 579197 [details] [diff] [review]
Only try to init the critical range if we are able to walk the stack

This fixes the case of a 64 bit OS X without unwind.h.
Comment 6 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-05 19:12:59 PST
https://tbpl.mozilla.org/?tree=Try&rev=8fd905218656
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2011-12-06 10:45:57 PST
Comment on attachment 579197 [details] [diff] [review]
Only try to init the critical range if we are able to walk the stack

This patch does not fix the crash for me.  The real issue, as far as I can tell, is that the set of conditions for this code to be compiled is different with the set of conditions for a useful implementation of NS_StackWalk to be compiled.
Comment 8 :Ehsan Akhgari (busy, don't ask for review please) 2011-12-06 11:06:32 PST
Created attachment 579380 [details]
My mozilla-config.h
Comment 9 :Ehsan Akhgari (busy, don't ask for review please) 2011-12-06 11:07:32 PST
Created attachment 579381 [details]
My nsStackWalk.i
Comment 10 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-06 11:13:56 PST
Note that  OnLionOrLater is not on the .ii file. If you are still seeing an assert with it, we are missing a dependency somewhere.
Comment 11 :Ehsan Akhgari (busy, don't ask for review please) 2011-12-06 11:21:35 PST
Comment on attachment 579197 [details] [diff] [review]
Only try to init the critical range if we are able to walk the stack

I don't know what was happening last time that I tried this, but this is definitely fixing the crashes.  So, r=me.
Comment 12 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-06 11:36:13 PST
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=d980f5b9f338
Comment 13 Ed Morley [:emorley] 2011-12-07 02:47:34 PST
https://hg.mozilla.org/mozilla-central/rev/d980f5b9f338
Comment 14 Mark Banner (:standard8) 2012-04-03 08:31:19 PDT
Comment on attachment 579197 [details] [diff] [review]
Only try to init the critical range if we are able to walk the stack

This is now biting me on the mozilla-esr10 branch, can we backport it there as well?

The fix has been shipped in 11 already.
Comment 15 Lukas Blakk [:lsblakk] use ?needinfo 2012-04-05 16:44:27 PDT
Comment on attachment 579197 [details] [diff] [review]
Only try to init the critical range if we are able to walk the stack

[triage comment]
esr branch is strictly production and afaik no one should be doing clang builds here, please re-nom if there's a case for how this affects the user or production builds.

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