Skip to content
New issue

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

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

Already on GitHub? # to your account

No feedback from integer divide by zero #151

Closed
heybdj opened this issue Feb 13, 2024 · 3 comments
Closed

No feedback from integer divide by zero #151

heybdj opened this issue Feb 13, 2024 · 3 comments
Labels
Bug A report of unintended or broken behavior.

Comments

@heybdj
Copy link

heybdj commented Feb 13, 2024

I had some code that was accidentally doing a divide by zero. It basically looked like this:

volatile unsigned zero = 0; // `volatile` so the compiler doesn't notice the divide by 0
unsigned bad_value = (zero % zero); // <-- debugger stalls with no feedback here

It took me a few extra moments to track down because I wasn't getting any feedback from the debugger. It showed my app in a green running state, even though execution stopped on the line that threw the exception. Should the debugger go into its red-coloured error state in this case? Is it possible to output an error message about the exception?

(This may be the same request as #120--not sure!).

@Lperlind
Copy link

I hit this too. Was easy to track down by just looking at the callstack, but some feedback from the debugger would be appreciated.

@mmozeiko
Copy link
Contributor

It looks like a bug in debugger, it should not hang like that.

But if you enable "0xc0000094 Division by Zero" exception in View -> Exception Filters, then debugger correctly stops on exception.

@ryanfleury ryanfleury added the Bug A report of unintended or broken behavior. label Feb 17, 2024
@ryanfleury
Copy link
Collaborator

Fixed in e136a67.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug A report of unintended or broken behavior.
Projects
None yet
Development

No branches or pull requests

4 participants