[Bug sanitizer/65400] tsan mis-compiles inlineable C functions
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 19 07:54:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65400
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 19 07:53:38 2015
New Revision: 221508
URL: https://gcc.gnu.org/viewcvs?rev=221508&root=gcc&view=rev
Log:
PR sanitizer/65400
* ipa-split.c (find_return_bb): Allow TSAN_FUNC_EXIT internal
call in the return bb.
(find_split_points): Add RETURN_BB argument, don't call
find_return_bb.
(split_function): Likewise. Add ADD_TSAN_FUNC_EXIT argument,
if true append TSAN_FUNC_EXIT internal call after the call to
the split off function.
(execute_split_functions): Call find_return_bb here.
Don't optimize if TSAN_FUNC_EXIT is found in unexpected places.
Adjust find_split_points and split_function calls.
* c-c++-common/tsan/pr65400-1.c: New test.
* c-c++-common/tsan/pr65400-2.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/tsan/pr65400-1.c
trunk/gcc/testsuite/c-c++-common/tsan/pr65400-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-split.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list