ramosian-glider / sanitizers

0 stars 0 forks source link

introduce the Task concept #143

Open ramosian-glider opened 9 years ago

ramosian-glider commented 9 years ago

Originally reported on Google Code with ID 142

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.

Reported by ramosian.glider on 2013-01-17 07:46:10

ramosian-glider 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.

Reported by dvyukov@google.com on 2013-01-17 08:03:18

ramosian-glider 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.

Reported by samsonov@google.com on 2013-01-17 08:27:06

ramosian-glider commented 9 years ago
This is not OSX-specific. 

Reported by konstantin.s.serebryany on 2013-02-18 08:42:33

ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2013-02-18 08:48:09

ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2015-07-30 09:05:31

ramosian-glider commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:06:55