> On Sep 12, 2019, at 11:09 AM, Robert Elz <k...@munnari.oz.au> wrote: > > To me it seems apparent that the sanatiser is detecting the local variable > in main() go out of scope when main() returns, and so the value it contains > (the pointer to the allocated memory) is lost, and so it is determined that > there is a leak. For any other function that would often be true, but for > main() it never is.
It seems obvious that the sanitizer should special-case main(). -- thorpej