[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2015-03-19 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #27 from Jakub Jelinek --- Author: jakub Date: Thu Mar 19 07:55:22 2015 New Revision: 221509 URL: https://gcc.gnu.org/viewcvs?rev=221509&root=gcc&view=rev Log: PR sanitizer/64265 * g++.dg/tsan/pr64265.C: New test. Added:

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2015-01-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #26 from Jakub Jelinek --- Author: jakub Date: Mon Jan 5 21:47:51 2015 New Revision: 219202 URL: https://gcc.gnu.org/viewcvs?rev=219202&root=gcc&view=rev Log: PR sanitizer/64265 * gimplify.c (gimplify_function_tree): Add TSA

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #24 from Jakub Jelinek --- Author: jakub Date: Mon Dec 15 09:50:11 2014 New Revision: 218736 URL: https://gcc.gnu.org/viewcvs?rev=218736&root=gcc&view=rev Log: PR sanitizer/64265 * tsan.c (instrument_func_entry): Insert __tsa

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #23 from Jakub Jelinek --- Author: jakub Date: Mon Dec 15 09:46:21 2014 New Revision: 218735 URL: https://gcc.gnu.org/viewcvs?rev=218735&root=gcc&view=rev Log: PR sanitizer/64265 * tsan.c (instrument_func_entry): Insert __tsa

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #22 from Jakub Jelinek --- Author: jakub Date: Mon Dec 15 09:37:47 2014 New Revision: 218734 URL: https://gcc.gnu.org/viewcvs?rev=218734&root=gcc&view=rev Log: PR sanitizer/64265 * tsan.c (instrument_func_entry): Insert __tsa

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #21 from Jakub Jelinek --- FYI, the #c12 patch needs more work, in particular the inliner probably has to drop the TSAN_FUNC_EXIT () internal calls, otherwise after inlining there can be multiple of them which is undesirable, as tsan

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread dvyukov at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #20 from Dmitry Vyukov --- No, TSAN_GO is not defined for C/C++ tsan. It's only for race detector for Go language.

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #19 from Bernd Edlinger --- oh, I see now, in tsan/tsan_rtl.cc // Shadow stack maintenance can be replaced with // stack unwinding during trace switch (which presumably must be faster). DCHECK_GE(thr->shadow_stack_pos, thr->sha

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #18 from Bernd Edlinger --- (In reply to Jakub Jelinek from comment #15) > I've been running the tests for quite a while and RSS didn't increase in top > at all. > > As for "and no calls to other functions", sure, I haven't changed a

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread dvyukov at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #17 from Dmitry Vyukov --- Great. Jakub, then you can go for gcc support whenever you have time. It's not super priority as we managed to live without exceptions support so far.

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread kcc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #16 from Kostya Serebryany --- > Kostya, can you say anything about llvm? On the tsan issue you said: > "We'll need a kind of RAII for tsan entry/exit hooks. When we are adding > tsan instrumentation, we need to create a fake class ob

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #15 from Jakub Jelinek --- I've been running the tests for quite a while and RSS didn't increase in top at all. As for "and no calls to other functions", sure, I haven't changed anything on that logic.

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #14 from Bernd Edlinger --- (In reply to Jakub Jelinek from comment #7) > Note, I don't see any kind of memory leak on any of the testcases. > Sure, calling __tsan_func_entry many times is of course wrong. > As for #c5, clang doesn't

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread dvyukov at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #13 from Dmitry Vyukov --- > ... we actually don't want any __tsan_func_{entry,exit} calls if there are no > memory accesses in the function... ... and no calls to other functions, because these functions can contain memory accesses

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #12 from Jakub Jelinek --- Created attachment 34271 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34271&action=edit gcc5-pr64265-2.patch Incremental patch to handle the exceptions, completely untested (don't have spare cycles

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread dvyukov at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #11 from Dmitry Vyukov --- >Doing it in gimplify_function_tree is pretty straightforward That's good! >So, the question is just if you want to do it that way... Kostya, can you say anything about llvm? On the tsan issue you said: "

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #10 from Jakub Jelinek --- Created attachment 34270 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34270&action=edit gcc5-pr64265.patch Untested patch to fix just the func entry issue.

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #9 from Jakub Jelinek --- Doing it in gimplify_function_tree is pretty straightforward, after all, we already have there code to handle if (flag_instrument_function_entry_exit && !DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (fndecl

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread dvyukov at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 Dmitry Vyukov changed: What|Removed |Added CC||dvyukov at google dot com --- Comment #8

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #7 from Jakub Jelinek --- Note, I don't see any kind of memory leak on any of the testcases. Sure, calling __tsan_func_entry many times is of course wrong. As for #c5, clang doesn't call __tsan_func_exit in that case either. Dmitry?

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #6 from Jakub Jelinek --- Seems there are more such spots that insert stmts at gsi_after_labels of single_succ of entry block - e.g. ipa-split.c, omp-low.c, tree-inline.c, tree-into-ssa.c, tree-profile.c, tree-ssa-reassoc.c at least.

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 Bernd Edlinger changed: What|Removed |Added CC||edlinger at gcc dot gnu.org --- Comment

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #4 from Bernd Edlinger --- and now I see that his example is mis-compiled too: cat test1.cpp int test1(int x) { abc: x=x+1; __builtin_printf("Test %d\n", x); if (x<9) goto abc; return 0; } is transformed to this in test

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #3 from Richard Biener --- static void instrument_func_entry (void) { basic_block succ_bb; gimple_stmt_iterator gsi; tree ret_addr, builtin_decl; gimple g; succ_bb = single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)); gsi = gsi_

[Bug sanitizer/64265] [5 Regression] r217669 broke tsan

2014-12-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|