Skip to content

Java front-end: fix vector index type in populate_live_range_holes #6682

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

Merged

Conversation

tautschnig
Copy link
Collaborator

CodeQL rightly complained that there is comparison using a more narrow
type on the left-hand side of a less-than in a loop condition, which may
give rise to a non-terminating loop in case of integer overflow.

While at it, also add checks before unconditionally accessing the first
element.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #6682 (1d5c4b1) into develop (05e1fd6) will increase coverage by 0.03%.
The diff coverage is 86.68%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6682      +/-   ##
===========================================
+ Coverage    76.89%   76.92%   +0.03%     
===========================================
  Files         1582     1583       +1     
  Lines       183170   183314     +144     
===========================================
+ Hits        140840   141018     +178     
+ Misses       42330    42296      -34     
Impacted Files Coverage Δ
jbmc/src/java_bytecode/lazy_goto_model.cpp 82.17% <0.00%> (ø)
src/ansi-c/expr2c_class.h 100.00% <ø> (ø)
src/crangler/ctokenit.cpp 0.00% <0.00%> (ø)
src/crangler/mini_c_parser.cpp 72.67% <0.00%> (ø)
src/goto-checker/solver_factory.h 100.00% <ø> (ø)
src/goto-instrument/reachability_slicer_class.h 100.00% <ø> (ø)
src/goto-programs/goto_trace.h 100.00% <ø> (ø)
src/memory-analyzer/analyze_symbol.cpp 72.98% <0.00%> (ø)
src/symtab2gb/symtab2gb_parse_options.cpp 63.38% <0.00%> (ø)
src/util/exception_utils.cpp 91.66% <0.00%> (-6.12%) ⬇️
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98c23f5...1d5c4b1. Read the comment docs.

CodeQL rightly complained that there is comparison using a more narrow
type on the left-hand side of a less-than in a loop condition, which may
give rise to a non-terminating loop in case of integer overflow.

While at it, also add checks before unconditionally accessing the first
element.
@tautschnig tautschnig force-pushed the bugfixes/codeql-wrong-index-type branch from dfa869e to 1d5c4b1 Compare February 24, 2022 17:24
@tautschnig tautschnig merged commit dae6c09 into diffblue:develop Feb 24, 2022
@tautschnig tautschnig deleted the bugfixes/codeql-wrong-index-type branch February 24, 2022 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants