Skip to content

Commit

Permalink
Work around thread-safety analysis regression in clang
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=264046
rdar://117804778

Reviewed by Keith Miller.

Silence the warning to keep WebKit building with newer clang versions :(

* Source/JavaScriptCore/heap/MarkedBlock.cpp:
(JSC::MarkedBlock::aboutToMarkSlow):

Canonical link: https://commits.webkit.org/270073@main
  • Loading branch information
cdumez committed Nov 1, 2023
1 parent 3ad1996 commit 6c4ddc3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/JavaScriptCore/heap/MarkedBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,16 @@ void MarkedBlock::aboutToMarkSlow(HeapVersion markingVersion)
WTF::storeStoreFence();
header().m_markingVersion = markingVersion;

// Workaround for a clang regression <rdar://111818130>.
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wthread-safety-analysis"
#endif
// This means we're the first ones to mark any object in this block.
directory->setIsMarkingNotEmpty(Locker { directory->bitvectorLock() }, &handle(), true);
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}

void MarkedBlock::resetAllocated()
Expand Down

0 comments on commit 6c4ddc3

Please sign in to comment.