Closed Bug 829327 Opened 7 years ago Closed 7 years ago
Add back the MOZ
_NORETURN annotation on mozalloc _abort
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)
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)
I'm pretty sure this helped the crash stacks to be better on arm, so i would at least make it conditional.
Sounds good to me. What's the recommended way to check for that?
Looks like some existing code uses #if !defined(__arm__) -- I'll add that.
(sorry, forgot to qref to pick up the !defined(__arm__) change)
Attachment #700733 - Attachment is obsolete: true
Attachment #700733 - Attachment description: fix v2: now with #if !defined(__arm__) → fix v1 again (forgot to qref, sorry)
...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 #700786 - Flags: review?(jones.chris.g) → review+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.