Use currentStackPointer more
Created attachment 352115 [details] Patch
Comment on attachment 352115 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352115&action=review > Source/WTF/wtf/StackBounds.cpp:55 > + volatile uint8_t* stackValue = bitwise_cast<uint8_t*>(currentStackPointer()); Does this work on debug builds where this is an actual function call?
(In reply to Saam Barati from comment #2) > Comment on attachment 352115 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=352115&action=review > > > Source/WTF/wtf/StackBounds.cpp:55 > > + volatile uint8_t* stackValue = bitwise_cast<uint8_t*>(currentStackPointer()); > > Does this work on debug builds where this is an actual function call? Yeah, at least in x64, it works :)
Landed in https://trac.webkit.org/r237059
<rdar://problem/45213815>
(In reply to Yusuke Suzuki from comment #3) > (In reply to Saam Barati from comment #2) > > Comment on attachment 352115 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=352115&action=review > > > > > Source/WTF/wtf/StackBounds.cpp:55 > > > + volatile uint8_t* stackValue = bitwise_cast<uint8_t*>(currentStackPointer()); > > > > Does this work on debug builds where this is an actual function call? > > Yeah, at least in x64, it works :) Yes, currentStackPointer() is designed to work on both release and debug builds. They work differently though: the release build version relies on it being inlined, while the debug build version relies on it not being inlined.