kparzysz-quic commented on pull request #6292:
URL: https://github.com/apache/incubator-tvm/pull/6292#issuecomment-675747879


   There is a way to turn off the leak sanitizer: define a function `int 
__lsan_is_turned_off(void);` and make it return non-zero.
   
   Here's the description (from 
`compiler-rt/include/sanitizer/lsan_interface.h`):
   ```
     // The user may optionally provide this function to disallow leak checking
     // for the program it is linked into (if the return value is non-zero). 
This
     // function must be defined as returning a constant value; any behavior 
beyond
     // that is unsupported.
     // To avoid dead stripping, you may need to define this function with
     // __attribute__((used))
     int __lsan_is_turned_off(void);
   ```
   
   Btw, for static singleton, the C++ compiler will generate calls to their 
destructors when `main` terminates.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to