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

zig cc ubsan #9709

Closed
marler8997 opened this issue Sep 8, 2021 · 1 comment
Closed

zig cc ubsan #9709

marler8997 opened this issue Sep 8, 2021 · 1 comment
Milestone

Comments

@marler8997
Copy link
Contributor

marler8997 commented Sep 8, 2021

Right now zig cc uses the following options.

-fsanitize=undefined -fsanitize-trap=undefined

This enables ubsan (undefined behavior sanitization) which means at runtime the program will check for undefined behavior. The -fsanitize-trap=undefined option is used when the sanitizer runtime is unavailable, and seems to result in "illegal instruction" errors rather than nice easy-to-debug panics (i.e. #9701).

I propose that Zig implement or include the ubsan runtime and by default have it print stack traces like a normal zig panic would do.

@alexrp
Copy link
Sponsor Contributor

alexrp commented Sep 8, 2021

#5163

@andrewrk andrewrk closed this as completed Sep 9, 2021
@andrewrk andrewrk added this to the 0.9.0 milestone Nov 20, 2021
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

3 participants