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

Disable leak sanitizer #132

Merged
merged 3 commits into from
Nov 19, 2024
Merged

Disable leak sanitizer #132

merged 3 commits into from
Nov 19, 2024

Conversation

shao-hua-li
Copy link
Collaborator

ASAN be default detects memory leaks, which are not actually undefined behaviors. https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer

We previously did not encounter this issue because csmith does not use any heap memory.

This PR disable leak sanitizer as I'm adding heap memory support to program generators.

ASAN be default detects memory leaks, which are not actually undefined behaviors. https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer

We previously did not encounter this issue because csmith does not use any heap memory.

This PR disable leak sanitizer as I'm adding heap memory support to program generators.
@thetheodor
Copy link
Member

Thanks for the PR. I think it would be even better to make it configurable instead of hardcoding the sanitizer environment parameters:

  • the Sanitizer class should include a sanitizer_env_variables (or similarly named) attribute, that is initialized with some sane values and optionally can be overridden when creating a sanitizer object
  • sanitizer_env_variables is used whenever check_for_sanitizer_errors is called.

Does this make sense?

@shao-hua-li
Copy link
Collaborator Author

Yes, it would be nice to allow users to setup the env

@shao-hua-li
Copy link
Collaborator Author

I have added a new sanitizer_env_variables para, which is set to the previous default value.

@thetheodor thetheodor merged commit 66c1ad8 into main Nov 19, 2024
5 checks passed
@thetheodor
Copy link
Member

Thanks for the patch!

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

Successfully merging this pull request may close these issues.

2 participants