Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address Sanitizer finding #125

Closed
erincatto opened this issue Apr 25, 2024 · 1 comment
Closed

Address Sanitizer finding #125

erincatto opened this issue Apr 25, 2024 · 1 comment

Comments

@erincatto
Copy link
Contributor

erincatto commented Apr 25, 2024

I've been doing more sanitizer runs and hit another issue. There are calls to GetConfig() that return a structure by value and then code is taking reference to a member of that structure. This is a reference to a temporary variable that is out of scope.

There are several of these:

const CustomAllocator& customAllocator = pETS_->GetConfig().customAllocator;

I tried a simple fix:

CustomAllocator customAllocator = pETS_->GetConfig().customAllocator;

And this made ASAN happy.

I can submit a PR if you like.

erincatto added a commit to erincatto/box2c that referenced this issue Apr 25, 2024
- more sanitizer usage, delayed by an enkiTS issue:
dougbinks/enkiTS#125
- fix #145
- address #144
- fix #141
@dougbinks
Copy link
Owner

Thanks for this issue report - I'm happy to receive a PR if you want your name in the commit log, but I'm equally happy just to make the change myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants