Closed Bug 1149408 Opened 11 years ago Closed 9 years ago

../../../gecko/js/src/vm/HelperThreads.cpp:1006:102: error: the address of 'void NuwaMarkCurrentThread(void (*)(void*), void*)' will never be NULL [-Werror=address]

Categories

(Core :: DOM: Content Processes, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kanru, Unassigned, NeedInfo)

Details

Attachments

(2 obsolete files)

Build with B2G_DEBUG=y and MOZ_ENABLE_WARNINGS_AS_ERRORS=1
Attached file MozReview Request: bz://1149408/kanru (obsolete) —
/r/6345 - Bug 1149408 - Fix -Waddress error in js/src/vm/HelperThreads.cpp r=tlee Pull down this commit: hg pull review -r 80ab0e7e083ddb67d30648930ad08bff952b1c85
Comment on attachment 8586006 [details] MozReview Request: bz://1149408/kanru /r/6345 - Bug 1149408 - Fix -Waddress error in js/src/vm/HelperThreads.cpp r=tlee Pull down this commit: hg pull review -r 80ab0e7e083ddb67d30648930ad08bff952b1c85
Attachment #8586006 - Flags: review?(tlee)
review ping
Flags: needinfo?(tlee)
Since it is a part of mozglue, it should not be a part of libxul. libxul is not linked against mozglue, it should use weak symbol instead of a normal one. So, I don't think remove assertion is a right solution.
Flags: needinfo?(tlee) → needinfo?(cyu)
see also https://dxr.mozilla.org/mozilla-central/source/mfbt/Types.h#92. It looks like MFBT_API is already making it as a weak symbol. If I am right, the error message should not be there. Please check if it is already a weak symbol.
(In reply to Thinker Li [:sinker] from comment #4) > Since it is a part of mozglue, it should not be a part of libxul. libxul is > not linked against mozglue, it should use weak symbol instead of a normal > one. libxul is dynamically linked against libmozglue on B2G (and Android, and Windows, and OS X), instead of being a static library linked into executables the way it is on Linux desktop (which is what MOZ_GLUE_IN_PROGRAM refers to). So MOZ_GLUE_IN_PROGRAM isn't defined on B2G, meaning that MFBT_API doesn't create weak symbols, and the compiler is right: the address can't be null. See: https://hg.mozilla.org/mozilla-central/file/078128c2600a/configure.in#l7075 (also, the top of mozglue/build/moz.build)
Without libmozglue, B2G can't function properly and is going to to crash in other places before reaching this line of assertion. The use of weak symbol doesn't really buy us much benefit. Since it's confirmed that the address can't be null, I think it's OK to remove the assertion. Thinker, do you have any other concern?
Flags: needinfo?(cyu) → needinfo?(tlee)
Attachment #8586006 - Attachment is obsolete: true
Attachment #8586006 - Flags: review?(tlee)
Attachment #8619917 - Flags: review?(tlee)
Attachment #8619917 - Attachment is obsolete: true
Attachment #8619917 - Flags: review?(tlee)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: