Skip to content

The current code has a bounds safety issue that could cause a BoundsError#76

Closed
dronabopche wants to merge 1 commit intoJuliaLang:mainfrom
dronabopche:main
Closed

The current code has a bounds safety issue that could cause a BoundsError#76
dronabopche wants to merge 1 commit intoJuliaLang:mainfrom
dronabopche:main

Conversation

@dronabopche
Copy link
Copy Markdown

Problem : The current code has a bounds safety issue that could cause a BoundsError

example : when reached i = lastindex tag stores val lastindex+1 that can cause problem

Change

Current code Is:

i, ilast = firstindex(liste), lastindex(liste)
while i <= ilast
    tag = liste[i + 1]
    ...
end

change i DID:

i, ilast = firstindex(liste), lastindex(liste)
while i + 1 <= ilast
    tag = liste[i + 1]
    ...
end

can Do this if wanted an error log

at the end of the loop, if i <= ilast, you can throw a clearer error:

if i <= ilast
    error("Malformed invalidation list: unexpected trailing entries")
end

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.47%. Comparing base (542d964) to head (fee4e6c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   82.47%   82.47%           
=======================================
  Files           3        3           
  Lines          97       97           
=======================================
  Hits           80       80           
  Misses         17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dronabopche dronabopche closed this by deleting the head repository Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant