Revert "Update GetCurrentStackPosition to use built-in"
This reverts commit 12c81480a3
.
Reason for revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/3967
Original change's description:
> Update GetCurrentStackPosition to use built-in
>
> By using a built-in this functions works with SafeStack and doesn't
> require an attribute disabling ASan.
>
> BUG=chromium:864705
>
> Change-Id: I20cc818f1a0724a017a4f7f9ae3cd8fedb6245ee
> Reviewed-on: https://chromium-review.googlesource.com/1141045
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54884}
TBR=clemensh@chromium.org,vtsyrklevich@chromium.org
Change-Id: I779091eb7e98f6a8920e274df60e35693bfdc512
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:864705
Reviewed-on: https://chromium-review.googlesource.com/1161881
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54886}
This commit is contained in:
parent
267b1d2b0d
commit
02b85b1977
13
src/utils.h
13
src/utils.h
@ -1562,14 +1562,13 @@ bool DoubleToBoolean(double d);
|
||||
template <typename Stream>
|
||||
bool StringToArrayIndex(Stream* stream, uint32_t* index);
|
||||
|
||||
// Returns current value of top of the stack. Works correctly with ASAN and
|
||||
// SafeStack.
|
||||
// Returns current value of top of the stack. Works correctly with ASAN.
|
||||
DISABLE_ASAN
|
||||
inline uintptr_t GetCurrentStackPosition() {
|
||||
#if V8_CC_MSVC
|
||||
return reinterpret_cast<uintptr_t>(_AddressOfReturnAddress());
|
||||
#else
|
||||
return reinterpret_cast<uintptr_t>(__builtin_frame_address(0));
|
||||
#endif
|
||||
// Takes the address of the limit variable in order to find out where
|
||||
// the top of stack is right now.
|
||||
uintptr_t limit = reinterpret_cast<uintptr_t>(&limit);
|
||||
return limit;
|
||||
}
|
||||
|
||||
template <typename V>
|
||||
|
Loading…
Reference in New Issue
Block a user