Closed
Bug 1141731
Opened 10 years ago
Closed 10 years ago
build breakage: dist/include/malloc_decls.h:54:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
Categories
(Core :: Memory Allocator, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
People
(Reporter: keeler, Assigned: glandium)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
Build currently fails with clang on linux with:
0:25.98 In file included from /home/keeler/mozilla-central/obj-x86_64-unknown-linux-gnu/memory/mozalloc/Unified_cpp_memory_mozalloc0.cpp:2:
0:25.98 In file included from /home/keeler/mozilla-central/memory/mozalloc/mozalloc.cpp:29:
0:25.99 ../../dist/include/malloc_decls.h:54:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
0:25.99 MALLOC_DECL(malloc_good_size, size_t, size_t)
0:25.99 ^
0:25.99 /home/keeler/mozilla-central/memory/mozalloc/mozalloc.cpp:27:14: note: expanded from macro 'MALLOC_DECL'
0:25.99 extern "C" MOZ_MEMORY_API return_type name ## _impl(__VA_ARGS__);
0:25.99 ^
0:25.99 ../../dist/include/mozmemory_wrap.h:146:32: note: expanded from macro 'MOZ_MEMORY_API'
0:25.99 # define MOZ_MEMORY_API MFBT_API
0:25.99 ^
0:25.99 ../../dist/include/mozilla/Types.h:82:24: note: expanded from macro 'MFBT_API'
0:25.99 # define MFBT_API MOZ_EXPORT
0:25.99 ^
0:25.99 ../../dist/include/mozilla/Types.h:44:45: note: expanded from macro 'MOZ_EXPORT'
0:25.99 # define MOZ_EXPORT __attribute__((visibility("default")))
0:25.99 ^
0:25.99 ../../dist/include/mozmemory.h:41:22: note: previous definition is here
0:25.99 static inline size_t _malloc_good_size(size_t size) {
0:25.99 ^
0:25.99 1 error generated.
hg bisect says bug 868814 caused this.
Assignee | ||
Comment 1•10 years ago
|
||
I can't reproduce locally. What's your mozconfig?
Reporter | ||
Comment 2•10 years ago
|
||
ac_add_options --enable-warnings-as-errors is probably the relevant part
Comment 3•10 years ago
|
||
nsm and I both ran into this, too.
nsm discovered that you can hack around this (locally) by commenting out the "define malloc_good_size" line in memory/build/mozmemory.h.
Comment 4•10 years ago
|
||
(FWIW, I'm using clang 3.7, and nsm's using clang 3.5.1. We're both on linux.)
Version: unspecified → Trunk
Assignee | ||
Comment 5•10 years ago
|
||
Assignee: nobody → mh+mozilla
Attachment #8575655 -
Flags: review?(n.nethercote)
Comment 6•10 years ago
|
||
Comment on attachment 8575655 [details] [diff] [review]
Avoid problems caused by the inclusion of mozmemory.h in mozalloc.cpp by including mozmemory_wrap.h instead
Review of attachment 8575655 [details] [diff] [review]:
-----------------------------------------------------------------
rs=me
Attachment #8575655 -
Flags: review?(n.nethercote) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/ae0468972de2 for OSX build bustage before glandium could say "actually, wait a sec":
https://treeherder.mozilla.org/logviewer.html#?job_id=7436790&repo=mozilla-inbound
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8575655 -
Attachment is obsolete: true
Attachment #8575742 -
Flags: review?(n.nethercote)
Comment 10•10 years ago
|
||
Comment on attachment 8575742 [details] [diff] [review]
Avoid problems caused by the inclusion of mozmemory.h in mozalloc.cpp by including mozmemory_wrap.h instead
Review of attachment 8575742 [details] [diff] [review]:
-----------------------------------------------------------------
rs=me
Attachment #8575742 -
Flags: review?(n.nethercote) → review+
Comment 11•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Assignee | ||
Updated•9 years ago
|
status-firefox40:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•