-
Notifications
You must be signed in to change notification settings - Fork 903
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
CI: Sanitize for undefined behavior #4845
Conversation
841cee5
to
fad158b
Compare
We should probably exclude the whole
or maybe
What should |
The CI does fail in an unfortunately opaque way (the ubsan output gets redirected to
|
There is a |
Ah, that's handy. |
fad158b
to
212d2a6
Compare
The CI is green now, someone please review |
I think
in |
The one instance of UB has been easy to patch. I'd only start the exclusion list if issues with that library keep coming back. |
Oh! I missed that you patched the library 😅 lgtm |
What are the reasons/motivation for this change?
Yosys includes some amount of buggy code that invokes undefined behavior, e.g. #4844. This should be fixed and stay fixed.
Explain how this is achieved.
By running the Undefined Behavior Sanitizer on each commit/PR. UBSan does not have false positives and has a slim impact on performance, so this is done unconditionally.
If applicable, please suggest to reviewers how they can test the change.
Add
SANITIZER = undefined
to yourMakefile.conf
, then runmake clean && make && UBSAN_OPTIONS=halt_on_error=1 make test
.