Closed Bug 1396889 Opened 7 years ago Closed 7 years ago

don't warn about infinite recursion in mozalloc_abort

Categories

(Core :: Memory Allocator, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file, 1 obsolete file)

mozalloc_abort is not marked as a noreturn function on Android, so clang
complains when abort calls mozalloc_abort, which calls MOZ_CRASH, which
calls abort().  We know this is OK, so just disable the warning.
Attachment #8904612 - Flags: review?(mh+mozilla)
Blocks: 1163171
Comment on attachment 8904612 [details] [diff] [review]
don't warn about infinite recursion in mozalloc_abort

Review of attachment 8904612 [details] [diff] [review]:
-----------------------------------------------------------------

::: memory/mozalloc/moz.build
@@ +26,5 @@
>      SOURCES += [
>          'winheap.cpp',
>      ]
>  
> +if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang':

The ifndef in mozalloc_abort.h is for arm, not android.

@@ +28,5 @@
>      ]
>  
> +if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang':
> +    CXXFLAGS += [
> +        '-Wno-infinite-recursion',

Maybe only set this on mozalloc_abort.cpp?
Attachment #8904612 - Flags: review?(mh+mozilla)
This should address your concerns.
Attachment #8907790 - Flags: review?(mh+mozilla)
Attachment #8904612 - Attachment is obsolete: true
Attachment #8907790 - Flags: review?(mh+mozilla) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/531247b23a52
don't warn about infinite recursion in mozalloc_abort; r=glandium
https://hg.mozilla.org/mozilla-central/rev/531247b23a52
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.