ramvasanth / thread-sanitizer

Automatically exported from code.google.com/p/thread-sanitizer
0 stars 0 forks source link

gcc / Stack traces are polluted with garbage after std::sort was used on a small container #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce the problem:
1. Build attached file with gcc -fsanitize=thread
2. Run produced executable
3. Observe thread creation call stacks

What is the expected output?
I expect to see call stacks consisting of main and pthread_create functions. 
Probably with C runtime initialization code below main.
What do you see instead?
I see main followed by std::sort and std::normal_iterator code, then again main 
and pthread_create. As if main was called recursively from std::sort.

What version of the product are you using? On what operating system?
Ubuntu 14.04 x64, tried with gcc 4.9.1 that is shipped with this OS and trunk 
gcc.

This is really nasty bug because it bloats all call stacks very quickly if your 
code uses std::sort on containers larger than ~15 elements. The app being 
tested spends almost all CPU time in addr2line helper translating the garbage.

Original issue reported on code.google.com by i...@unity3d.com on 10 Sep 2014 at 3:50

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dvyu...@google.com on 10 Sep 2014 at 8:10

GoogleCodeExporter commented 9 years ago
I can reproduce it with fresh gcc. Filed:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63251
Closing this issue as it is unactionable.

Original comment by dvyu...@google.com on 12 Sep 2014 at 10:30

GoogleCodeExporter commented 9 years ago
Adding Project:ThreadSanitizer as part of GitHub migration.

Original comment by gli...@google.com on 30 Jul 2015 at 9:21