On Fri, Jun 13, 2025 at 01:52:19PM +0530, HHN wrote: > GCC15 changes the signature of the `__tsan_func_exit` builtin function from > `void(void *)` to `void(void)` in the following commit > <https://github.com/gcc-mirror/gcc/commit/07565115371e#diff-1e5bf766c4c8924f68cb79315944f820eabd44bf881f2db7e746af4df86cd0a8R250> The gcc builtin had incorrect prototype by mistake. The function is a builtin solely because the compiler needs to call it with -fsanitize=thread on its own, and the calls added by the compiler actually were using just __tsan_func_exit(), which is also what libtsan expects and implements. > Attaching the godbolt <https://godbolt.org/z/x3fda57r5> link showcasing the > warning generated > > Currently I am working with a codebase which explicitly calls > `__tsan_func_exit(NULL)` in certain places and am curious as to whether > backwards compatibility of the builtin function signatures is a goal? You shouldn't call __tsan_func_exit in user code, whether as () or as (NULL), without including appropriate header (tsan_interface.h). In fact, I wonder why does the codebase actually call it at all. The function is meant to be called from compiled code at the end of functions, if a function is -fsanitize=thread instrumented, it should be called there already, if it is not instrumented, I don't see why you should be calling it. Jakub