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

Division by zero #109

Open
problame opened this issue Nov 18, 2018 · 1 comment
Open

Division by zero #109

problame opened this issue Nov 18, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request needs-discussion safety 🔒 Language Safety features ub Undefined Behaviour
Projects
Milestone

Comments

@problame
Copy link
Contributor

Semcheck could warn about obvious cases (literals, constant propagation). A commit with the current suboptimal behavior will reference this issue in a few minutes.

IR codegen will need a decision on this topic.

@problame
Copy link
Contributor Author

Proposal: our compiler should generate code that checks for UB and crashes the program when it would happen, producing a nice stack trace.
The runtime support for this has been implemented in
cde2c6a .

See 7dcb98c for an example on how to use those functions.

@joshuabach joshuabach added safety 🔒 Language Safety features ub Undefined Behaviour labels Jan 4, 2019
@joshuabach joshuabach changed the title UB: division by zero Division by zero Jan 4, 2019
@problame problame added this to Todo !(optimization OR backend) in Endspurt Feb 4, 2019
@problame problame moved this from General Todo to Todo Safety in Endspurt Feb 4, 2019
@joshuabach joshuabach self-assigned this Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-discussion safety 🔒 Language Safety features ub Undefined Behaviour
Projects
Endspurt
  
Todo Safety
Development

No branches or pull requests

2 participants