DynamoRIO / DynamoRIO/dynamorio

Add new ASSERT that only activates in debug builds.

Open
#4,399 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

This a feature request to make a version of DR_ASSERT that automatically turns void during release builds.

Currently, DR_ASSERT and DR_ASSERT_MSG cannot be easily turned off for release builds. Unlike for , there is no "NDEBUG" version that turns DR asserts off. Therefore, a lot of code, particularly DR extensions, repeatedly resort to defining a new version of ASSERT to resolve the issue:

```
#ifdef DEBUG
# define ASSERT(x, msg) DR_ASSERT_MSG(x, msg)
#else
# define ASSERT(x, msg)
#endif
```

Add DR_ASSERT_DEBUG that is controllable with respect to the DEBUG def.

Contributor guide

Open the contributing guide

Research direction

Locate the definitions and existing uses of DR_ASSERT and DR_ASSERT_MSG, and inspect how the DEBUG definition is handled. Verify the resulting macro behavior under debug and release preprocessing, with DR_ASSERT_DEBUG active only in debug builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
devtools
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.