google / google/sanitizers

asan: detect at-exit racy use-after-free more reliable

Open
#683 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Today, asan may or may not report the following at-exit racy use-after-free.
To make the detection a bit more liable we may want to wait in the exit/_exit interceptor
for unfinished reports to complete.

```
#include
#include
int *a;
void Thread() {
usleep(1);
*a = 0;
}
int main() {
a = new int;
delete a;
std::thread t(Thread);
t.detach();
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the exit/_exit interceptor and trace how unfinished reports are handled during process termination. Run the provided detached-thread reproducer and compare repeated results; done means the at-exit racy use-after-free is detected more reliably after unfinished reports complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.