DynamoRIO / DynamoRIO/dynamorio

CRASH client (or private std lib) using C++ exceptions

Open
#1,717 8 comments 1 reaction 0 assignees View on GitHub
Bug-DRCrash help wanted Hotlist-Release OpSys-Windows Usability
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

Throwing a C++ exception doesn't work in a client, whether in dr_init or from a clean call:

```
DR_EXPORT void dr_init(client_id_t id)
{
try {
dr_printf("about to throw\n");
throw std::runtime_error("test throw");
dr_printf("should not get here\n");
} catch (std::runtime_error &e) {
dr_printf("caught runtime_error %s\n", e.what());
}
}
```

Results in a jump to 0:

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the shown client exception and inspect src/core/unix/signal.c around the reported check at line 4209. Verify behavior for both the dr_init example and std::ifstream failures; done means C++ exceptions no longer jump to address 0 and can be caught or handled as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.