Closed
Bug 751195
Opened 13 years ago
Closed 13 years ago
Turn ASan function instrumentation blacklist into code annotations
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: decoder, Assigned: decoder)
Details
(Keywords: sec-want, Whiteboard: [sg:want][asan-build-blocker])
Attachments
(2 files, 1 obsolete file)
547 bytes,
patch
|
khuey
:
review+
gkw
:
checkin+
|
Details | Diff | Splinter Review |
1.21 KB,
patch
|
decoder
:
review+
gkw
:
checkin+
|
Details | Diff | Splinter Review |
I recently got advised by the Google developers of AddressSanitizer that the way of blacklisting (preventing instrumentation) of functions we use (-mllvm -asan-blacklist file.txt) is deprecated. Instead we should use __attribute__((no_address_safety_analysis)) on every blacklisted function (guarded with an #ifdef MOZ_ASAN so gcc does not warn about the unknown attribute).
At the same time, we will be able to remove the build/asan/asan-blacklist.txt file that got recently added.
I'm filing this in the JS engine component because all blacklisted functions are located here.
Assignee | ||
Comment 1•13 years ago
|
||
First part, this blacklists the MarkRangeConservatively function.
Assignee: general → choller
Status: NEW → ASSIGNED
Assignee | ||
Updated•13 years ago
|
Whiteboard: [asan][sg:want] → [asan][sg:want][autoland-try]
Updated•13 years ago
|
Whiteboard: [asan][sg:want][autoland-try] → [asan][sg:want][autoland-in-queue]
Assignee | ||
Comment 2•13 years ago
|
||
Manually sent this to try since autoland seems to be broken.
Whiteboard: [asan][sg:want][autoland-in-queue] → [asan][sg:want]
Assignee | ||
Updated•13 years ago
|
Attachment #620652 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #620920 -
Flags: review?(khuey)
Assignee | ||
Comment 4•13 years ago
|
||
We won't need any further blacklisting for now as per discussion with espindola, we will be building debug+opt builds to avoid stack space exhaustion. If this becomes an issue later, we can still prevent certain functions from being instrumented or inlined.
Attachment #620920 -
Flags: review?(khuey) → review+
Comment on attachment 620652 [details] [diff] [review]
[Part 1] Annotate MarkRangeConservatively function
Review of attachment 620652 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/public/Utility.h
@@ +98,5 @@
> #define JS_STATIC_ASSERT_IF(cond, expr) MOZ_STATIC_ASSERT_IF(cond, expr, "JS_STATIC_ASSERT_IF")
>
> +
> +#ifdef MOZ_ASAN
> +#define MOZ_ASAN_BLACKLIST JS_NEVER_INLINE __attribute__((no_address_safety_analysis))
Please move this to mfbt/Attributes.h and use MOZ_NEVER_INLINE instead.
Attachment #620652 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Address review comments, looks much better like this. Thanks billm! :)
Carrying r+ and requesting checkin.
Attachment #620652 -
Attachment is obsolete: true
Attachment #621223 -
Flags: review+
Attachment #621223 -
Flags: checkin?(gary)
Assignee | ||
Updated•13 years ago
|
Attachment #620920 -
Flags: checkin?(gary)
Comment 7•13 years ago
|
||
Part 1 landed as:
http://hg.mozilla.org/integration/mozilla-inbound/rev/da3bc1a73045
and part 2 landed as:
http://hg.mozilla.org/integration/mozilla-inbound/rev/844211849448
Target Milestone: --- → mozilla15
Updated•13 years ago
|
Attachment #620920 -
Flags: checkin?(gary) → checkin+
Updated•13 years ago
|
Attachment #621223 -
Flags: checkin?(gary) → checkin+
Assignee | ||
Updated•13 years ago
|
Whiteboard: [asan][sg:want] → [sg:want][asan-build-blocker]
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Autoland Patchset:
Patches: 620652
Branch: mozilla-central => try
Patch 620652 could not be applied to mozilla-central.
patching file js/src/jsgc.cpp
Hunk #1 FAILED at 1079
1 out of 1 hunks FAILED -- saving rejects to file js/src/jsgc.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
Patch 620652 could not be applied to mozilla-central.
patching file js/public/Utility.h
Hunk #1 FAILED at 91
1 out of 1 hunks FAILED -- saving rejects to file js/public/Utility.h.rej
patching file js/src/jsgc.cpp
Hunk #1 FAILED at 1079
1 out of 1 hunks FAILED -- saving rejects to file js/src/jsgc.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
Patchset could not be applied and pushed.
You need to log in
before you can comment on or make changes to this bug.
Description
•