runtime: enable leak sanitizer in Go #67833
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FeatureRequest
Issues asking for a new feature that does not need a proposal.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Proposal Details
This is follow-up to #44853 which proposed to enable ASAN for Go.
One type of error in Go / C interop are memory leaks. These can be detected by ASAN using
ASAN_OPTIONS=detect_leaks=1
. Unfortunately, this doesn't fully work with Go's ASAN integration. For example, allocating a C object and storing it in a global variable in Go is detected as a leak.I believe to make LSAN work, all we need to do is to tell it about memory regions that Go manages to consider as roots using
__lsan_register_root_region
.The text was updated successfully, but these errors were encountered: