Skip to content

Commit

Permalink
Backed out changeset d85334f696eb (bug 1285057) for implicitly depend…
Browse files Browse the repository at this point in the history
…ing on clang 3.8.
  • Loading branch information
Terrence Cole committed Sep 23, 2016
1 parent fceed03 commit 660a195
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
4 changes: 1 addition & 3 deletions js/public/RootingAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,7 @@ class alignas(8) DispatchWrapper

// Trace the contained storage (of unknown type) using the trace function
// we set aside when we did know the type.
MOZ_UBSAN_BLACKLIST_FUNCTION static void TraceWrapped(JSTracer* trc, T* thingp,
const char* name)
{
static void TraceWrapped(JSTracer* trc, T* thingp, const char* name) {
auto wrapper = reinterpret_cast<DispatchWrapper*>(
uintptr_t(thingp) - offsetof(DispatchWrapper, storage));
wrapper->tracer(trc, &wrapper->storage, name);
Expand Down
2 changes: 1 addition & 1 deletion js/public/SweepingAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class WeakCache : public js::WeakCacheBase<T>,
const T& get() const { return cache; }
T& get() { return cache; }

MOZ_UBSAN_BLACKLIST_FUNCTION void sweep() { sweeper(&cache); }
void sweep() { sweeper(&cache); }
};

} // namespace JS
Expand Down
13 changes: 0 additions & 13 deletions mfbt/Attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,6 @@
# define MOZ_TSAN_BLACKLIST /* nothing */
#endif

/*
* MOZ_UBSAN_BLACKLIST_FUNCTION is a macro to tell UndefinedBehaviorSanitizer (a
* run-time instrumentation shipped with Clang) to not check the annotated
* function for undefined behaviors. Furthermore it prevents the compiler from
* inlining the function because inlining currently breaks the blacklisting
* mechanism of UBSan.
*/
#if defined(__clang__)
# define MOZ_UBSAN_BLACKLIST_FUNCTION MOZ_NEVER_INLINE __attribute__((no_sanitize("function")))
#else
# define MOZ_UBSAN_BLACKLIST_FUNCTION /* nothing */
#endif

/**
* MOZ_ALLOCATOR tells the compiler that the function it marks returns either a
* "fresh", "pointer-free" block of memory, or nullptr. "Fresh" means that the
Expand Down

0 comments on commit 660a195

Please sign in to comment.