gopalshankar / address-sanitizer

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

introduce the Task concept #142

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It turns out we don't create a separate AsanThread each time a GCD task is 
created. This hasn't affected us so far in ASan (perhaps we just didn't see 
many errors in the tasks), but treating tasks as threads is a must for TSan.

We need to figure out whether the current ASan behavior needs to be changed.

Pros:
 - it's possible to store parent_tid and creation stack per task, thus the error reports will be more accurate.
Cons:
 - potential performance penalty for GCD-intensive apps.

Original issue reported on code.google.com by ramosian.glider@gmail.com on 17 Jan 2013 at 7:46

GoogleCodeExporter commented 9 years ago
I would strongly suggest to separate thread and task concepts. This will make 
it clearer what belongs where, and will allow reduce lots of runtime costs and 
memory overhead (e.g. you do not want to malloc cache and keep statistics in 
each task and aggregate them on every task destruction).
Asan should also expose task API, so that it can be used in other contexts that 
use tasks (i.e. everywhere) and allow easy testing. So this is actually not-OSX 
specific.
At least that's my plan for Tsan. However, it's not that critical for Asan, so 
perhaps it's easier just to not do it at all.

Original comment by dvyu...@google.com on 17 Jan 2013 at 8:03

GoogleCodeExporter commented 9 years ago
ASan can certainly benefit from "task" concept, as I often observe error 
reports where thread creation stacks are irrelevant, and what we're really 
interested in is task creation stack. However, until now we managed to analyze 
reports successfully anyway.

Original comment by samso...@google.com on 17 Jan 2013 at 8:27

GoogleCodeExporter commented 9 years ago
This is not OSX-specific. 

Original comment by konstant...@gmail.com on 18 Feb 2013 at 8:42

GoogleCodeExporter commented 9 years ago

Original comment by ramosian.glider@gmail.com on 18 Feb 2013 at 8:48