question about mecca fiber with address sanitizer
Calvin P
cloudlessapp at gmail.com
Mon Dec 14 07:30:10 UTC 2020
On Sunday, 13 December 2020 at 22:00:42 UTC, kinke wrote:
> On Sunday, 13 December 2020 at 16:17:16 UTC, Calvin P wrote:
>> how to get the main thread stackBottom and stackSize, there
>> is a getStackBottom from https://wiki.dlang.org/LDC_inline_IR,
>> but only work for windows. I need a solution for linux and
>> macOS.
>
> druntime should contain all of that already, see
> getStack{Bottom,Top} in core.thread.osthread.
Thanks very much, I should look source code more hard.
Base on document:
https://github.com/llvm-mirror/compiler-rt/blob/master/include/sanitizer/common_interface_defs.h#L313, NULL fake stack pointer pass to __sanitizer_start_switch_fiber destroy the current fake stack.
https://github.com/ldc-developers/druntime/blob/ldc/src/core/thread/fiber.d#L1929, the NULL is pass to __sanitizer_finish_switch_fiber.
If I am correct, DRuntime will never destroy the fake stack?
More information about the digitalmars-d-ldc
mailing list