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

Improvement the int conversion overflow logic to handle bound checks #1194

Merged
merged 21 commits into from
Sep 4, 2024

Commits on Sep 4, 2024

  1. add test cases

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    d2b4d2f View commit details
    Browse the repository at this point in the history
  2. fix bounds check logic

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    fb90989 View commit details
    Browse the repository at this point in the history
  3. tweak test cases

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    9236690 View commit details
    Browse the repository at this point in the history
  4. fix codestyle

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    ed4e600 View commit details
    Browse the repository at this point in the history
  5. improve bounds check logic

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    97552d6 View commit details
    Browse the repository at this point in the history
  6. max recursion depth

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    1ab8ce6 View commit details
    Browse the repository at this point in the history
  7. add test case for len function

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    dd2f56b View commit details
    Browse the repository at this point in the history
  8. relax len function bounds checks

    Co-authored-by: Ben Krieger <[email protected]>
    2 people authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    945c388 View commit details
    Browse the repository at this point in the history
  9. handle cases when convert instruction is after the if blocks

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    0ad7744 View commit details
    Browse the repository at this point in the history
  10. improve range check discovery, add tests

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    6fdff93 View commit details
    Browse the repository at this point in the history
  11. refactor for readability

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    51f95f8 View commit details
    Browse the repository at this point in the history
  12. add cap function test

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    1c4433c View commit details
    Browse the repository at this point in the history
  13. calculate signed min without throwing overflow warnings

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    665036b View commit details
    Browse the repository at this point in the history
  14. perform bounds checks int size calculations

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    7b4830a View commit details
    Browse the repository at this point in the history
  15. basic equal operator logic

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    553d10f View commit details
    Browse the repository at this point in the history
  16. uintptr -> unsafe.Pointer test case

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    b8160ea View commit details
    Browse the repository at this point in the history
  17. fix review comments

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    f490e90 View commit details
    Browse the repository at this point in the history
  18. Rebase and fix go module

    Change-Id: I8da6495eaaf25b1739389aa98492bd7df338085b
    Signed-off-by: Cosmin Cojocar <[email protected]>
    ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    1c8555a View commit details
    Browse the repository at this point in the history
  19. fix false positive for negated value

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    3c8f85f View commit details
    Browse the repository at this point in the history
  20. fix range conditions

    Signed-off-by: czechbol <[email protected]>
    czechbol authored and ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    58dc764 View commit details
    Browse the repository at this point in the history
  21. Ignore the golangci/gosec G115 warning

    Change-Id: I0db56cb0a5f9ab6e815e2480ec0b66d7061b23d3
    Signed-off-by: Cosmin Cojocar <[email protected]>
    ccojocar committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    9f0427a View commit details
    Browse the repository at this point in the history