new arithmetic overflow rule#220
Conversation
✅ Deploy Preview for scrc-coding-guidelines ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
felix91gr
left a comment
There was a problem hiding this comment.
Preliminary review. We have a meeting together now, so I'd better submit it right away.
|
@felix91gr please approve me sir I am ready to be merged |
|
@felix91gr please review me. i'm very sad and wished to be merged. |
|
@rcseacord there's a merge conflict. It seems to be pretty trivial from here, and Github offers to let me resolve it in the Web UI, but I'd rather you resolve them instead because I don't want to break your working copy |
fixed a bunch of small problems and started adding compliant solutions using saturation semantics
adding Wrapping<T> example
Revised guidelines on arithmetic overflow, emphasizing prevention and the use of explicit wrapping functions. Updated examples to reflect compliant practices with saturation semantics.
Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
Clarify guidelines on eliminating arithmetic overflow for various integer types.
Clarify behavior of arithmetic overflow in Rust.
aa88512 to
81e0d9e
Compare
Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
|
@felix91gr rebased, please review! |
felix91gr
left a comment
There was a problem hiding this comment.
This should be a reasonable first review, I hope
Clarified behavior of arithmetic overflow in debug and release modes. Updated examples to emphasize the use of explicit wrapping and saturation semantics.
Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
PLeVasseur
left a comment
There was a problem hiding this comment.
LGTM, thanks @rcseacord
1b00276
|
Reviewed in session 2025-12-03 |
* new arithmetic overflow rule * Update expressions.rst fixed a bunch of small problems and started adding compliant solutions using saturation semantics * Update expressions.rst adding Wrapping<T> example * Revise arithmetic overflow guidelines and examples Revised guidelines on arithmetic overflow, emphasizing prevention and the use of explicit wrapping functions. Updated examples to reflect compliant practices with saturation semantics. * Update src/coding-guidelines/expressions.rst Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com> * Update expressions.rst to specify integer types for overflow Clarify guidelines on eliminating arithmetic overflow for various integer types. * Update guidelines on arithmetic overflow handling Clarify behavior of arithmetic overflow in Rust. * Clarify arithmetic overflow behavior in expressions.rst * rebase for fls errors * Update src/coding-guidelines/expressions.rst Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com> * Apply suggestion from @rcseacord * Clarify arithmetic overflow handling and examples Clarified behavior of arithmetic overflow in debug and release modes. Updated examples to emphasize the use of explicit wrapping and saturation semantics. * Update src/coding-guidelines/expressions.rst Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com> * Update src/coding-guidelines/expressions.rst Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com> * Update print statement format in Rust example * Update src/coding-guidelines/expressions.rst Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com> * Update src/coding-guidelines/expressions.rst Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com> * Update src/coding-guidelines/expressions.rst Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com> * Update expressions.rst --------- Co-authored-by: Félix Fischer <felix91gr@users.noreply.github.com>
added new arithmetic overflow rule covers the following two CERT rules
INT30-C. Ensure that unsigned integer operations do not wrap
INT32-C. Ensure that operations on signed integers do not result in overflow