Changeset 260692 in webkit
- Timestamp:
- Apr 25, 2020 12:24:07 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r260668 r260692 1 2020-04-24 Mark Lam <mark.lam@apple.com> 2 3 Suppress ASan on DFG::clobberize() to work around an ASan bug. 4 https://bugs.webkit.org/show_bug.cgi?id=211012 5 <rdar://problem/62275430> 6 7 Reviewed by Yusuke Suzuki. 8 9 Test is courtesy of Fabien Duchene and Pinki Gyanchandani. 10 11 * js/suppress-asan-on-clobberize-to-workaround-asan-bug-expected.txt: Added. 12 * js/suppress-asan-on-clobberize-to-workaround-asan-bug.html: Added. 13 1 14 2020-04-24 Kate Cheney <katherine_cheney@apple.com> 2 15 -
trunk/Source/JavaScriptCore/ChangeLog
r260690 r260692 1 2020-04-24 Mark Lam <mark.lam@apple.com> 2 3 Suppress ASan on DFG::clobberize() to work around an ASan bug. 4 https://bugs.webkit.org/show_bug.cgi?id=211012 5 <rdar://problem/62275430> 6 7 Reviewed by Yusuke Suzuki. 8 9 ASan was incorrectly thinking that we're accessing invalid stack memory when we're not. 10 11 * dfg/DFGClobberize.h: 12 (JSC::DFG::clobberize): 13 1 14 2020-04-24 Alexey Shvayka <shvaikalesh@gmail.com> 2 15 -
trunk/Source/JavaScriptCore/dfg/DFGClobberize.h
r260331 r260692 40 40 namespace JSC { namespace DFG { 41 41 42 // FIXME: SUPPRESS_ASAN is needed here because ASan can mistakenly think that 43 // we're accesing out of invalid bounds stack memory when we're not. For example, 44 // in the CheckIsConstant case below, we compute: 45 // AdjacencyList(AdjacencyList::Fixed, node->child1()) 46 // 47 // 1. The AdjacencyList constructor takes an Edge value. 48 // 2. node->child1() returns an Edge&. 49 // 3. Clang generates a call to __asan_memcpy to copy the return value of 50 // node->child1() to a temp local on the stack used for passing the Edge 51 // argument to the AdjacencyList constructor. 52 // 4. Inside __asan_memcpy, it attempts to write to the temp local Edge in 53 // clobberize's frame (not __asan_memcpy's frame), and ASan will wrongly 54 // flag this as an invalid out of stack bounds write. 55 // 56 // This manifested with a debug ASan build. 57 // See <rdar://problem/62362403>. 58 42 59 template<typename ReadFunctor, typename WriteFunctor, typename DefFunctor> 43 void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFunctor& write, const DefFunctor& def)60 SUPPRESS_ASAN void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFunctor& write, const DefFunctor& def) 44 61 { 45 62 // Some notes:
Note: See TracChangeset
for help on using the changeset viewer.