-
Notifications
You must be signed in to change notification settings - Fork 397
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
Enlarge SwitchAnalyzer successor counter #4450
Enlarge SwitchAnalyzer successor counter #4450
Conversation
Could you fix the spelling of "switch" in the commit title and body please? |
The switch analyzer currently uses an int8_t counter to count the number of time a given block is a successor of the swtich/table. This can easily overflow and result in undefined behaviour by the C++ code. This change enlarges the compiler to int32_t to prevent this kind of overflow and improves the assert to ensure a sesnible number is being generated. Signed-off-by: Andrew Craik <[email protected]>
13971b3
to
d62088e
Compare
Commit amended with spelling fix and fixed PR message as well. |
@genie-omr build all |
I am fine with the proposed fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
The switch analyzer currently uses an int8_t counter to count the number
of time a given block is a successor of the swtich/table. This can easily
overflow and result in undefined behaviour by the C++ code. This change
enlarges the compiler to int32_t to prevent this kind of overflow and
improves the assert to ensure a sesnible number is being generated.
Signed-off-by: Andrew Craik [email protected]