adding support for using llvm ASAN (#5536)
This commit is contained in:
parent
0ff1190fe7
commit
93753926f5
2 changed files with 31 additions and 1 deletions
|
|
@ -751,7 +751,13 @@ proc gcMark(gch: var GcHeap, p: pointer) {.inline.} =
|
|||
add(gch.decStack, cell)
|
||||
sysAssert(allocInv(gch.region), "gcMark end")
|
||||
|
||||
proc markStackAndRegisters(gch: var GcHeap) {.noinline, cdecl.} =
|
||||
#[
|
||||
This method is conditionally marked with an attribute so that it gets ignored by the LLVM ASAN
|
||||
(Address SANitizer) intrumentation as it will raise false errors due to the implementation of
|
||||
garbage collection that is used by Nim. For more information, please see the documentation of
|
||||
`CLANG_NO_SANITIZE_ADDRESS` in `lib/nimbase.h`.
|
||||
]#
|
||||
proc markStackAndRegisters(gch: var GcHeap) {.noinline, cdecl, codegenDecl: "CLANG_NO_SANITIZE_ADDRESS $# $#$#".} =
|
||||
forEachStackSlot(gch, gcMark)
|
||||
|
||||
proc collectZCT(gch: var GcHeap): bool =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue