Closed
Bug 829327
Opened 11 years ago
Closed 11 years ago
Add back the MOZ_NORETURN annotation on mozalloc_abort
Categories
(Core :: mozglue, defect)
Core
mozglue
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
967 bytes,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
One of the changes in bug 824224 was to remove the MOZ_NORETURN annotation on mozalloc_abort(). This triggers this build warning, w/ GCC 4.7.2 on Ubuntu 12.10: > mozalloc_abort.cpp: In function ‘void abort()’: > mozalloc_abort.cpp:40:1: warning: ‘noreturn’ function does return [enabled by default] ...because a system-header declares "abort() as noreturn, and we're providing our own abort() implementation, in which we call some other method (mozalloc_abort), and as far as the compiler knows, mozalloc_abort() *will* return, so abort()looks like it can also return. We can fix this by adding back the MOZ_NORETURN annotation on mozalloc_abort. Per bug 824224 comment 48, this change might decrease the quality of our crash-stacks, but we don't know that for sure, so I propose we do it. (and then, if it does break crash-stacks, we can revert it and maybe just disable this warning in this directory)
Assignee | ||
Updated•11 years ago
|
Blocks: buildwarning
Assignee | ||
Comment 1•11 years ago
|
||
This patch leaves the directory warning-free, too (at least on Linux; I'll verify on other platforms), so the patch marks it as FAIL_ON_WARNINGS = 1 to keep it that way. :)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #700713 -
Flags: review?(jones.chris.g)
Comment 2•11 years ago
|
||
I'm pretty sure this helped the crash stacks to be better on arm, so i would at least make it conditional.
Assignee | ||
Comment 3•11 years ago
|
||
Sounds good to me. What's the recommended way to check for that?
Assignee | ||
Comment 4•11 years ago
|
||
Looks like some existing code uses #if !defined(__arm__) -- I'll add that.
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #700713 -
Attachment is obsolete: true
Attachment #700713 -
Flags: review?(jones.chris.g)
Assignee | ||
Comment 6•11 years ago
|
||
(sorry, forgot to qref to pick up the !defined(__arm__) change)
Attachment #700733 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #700733 -
Attachment description: fix v2: now with #if !defined(__arm__) → fix v1 again (forgot to qref, sorry)
Assignee | ||
Updated•11 years ago
|
Attachment #700754 -
Flags: review?(jones.chris.g)
Assignee | ||
Comment 7•11 years ago
|
||
...and of course, our Android builds spam the same "warning: ‘noreturn’ function does return", so we can't mark this FAIL_ON_WARNINGS if we're exempting arm builds from the fix. So: Here's the patch again, w/out the FAIL_ON_WARNINGS annotation.
Attachment #700754 -
Attachment is obsolete: true
Attachment #700754 -
Flags: review?(jones.chris.g)
Attachment #700786 -
Flags: review?(jones.chris.g)
Updated•11 years ago
|
Attachment #700786 -
Flags: review?(jones.chris.g) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/796d19acafbb
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/796d19acafbb
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•