-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
numeric overflow in InvalidatingNodeVisitor.DeletingNodeVisitor #19445
Comments
iancha1992
pushed a commit
to iancha1992/bazel
that referenced
this issue
Jan 8, 2025
This protects against an integer overflow which could occur for large key list size and large thread counts. Regrettably, it's difficult to write a regression test for this scenario, as exercising this overflow requires lots of time and heap, so it would be a performance regression to our test suites. Fixes bazelbuild#19445 PiperOrigin-RevId: 595420516 Change-Id: Ic0a475a6a273c50fe9895dd0852fa5b062859cb2
@bazel-io fork 7.5.0 |
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this issue
Jan 8, 2025
This protects against an integer overflow which could occur for large key list size and large thread counts. Regrettably, it's difficult to write a regression test for this scenario, as exercising this overflow requires lots of time and heap, so it would be a performance regression to our test suites. Fixes bazelbuild#19445 PiperOrigin-RevId: 595420516 Change-Id: Ic0a475a6a273c50fe9895dd0852fa5b062859cb2
meteorcloudy
pushed a commit
that referenced
this issue
Jan 9, 2025
This protects against an integer overflow which could occur for large key list size and large thread counts. Regrettably, it's difficult to write a regression test for this scenario, as exercising this overflow requires lots of time and heap, so it would be a performance regression to our test suites. Fixes #19445 PiperOrigin-RevId: 595420516 Change-Id: Ic0a475a6a273c50fe9895dd0852fa5b062859cb2 Commit 3e373d0 Co-authored-by: Googler <[email protected]>
tom-neara
pushed a commit
to tom-neara/bazel
that referenced
this issue
Jan 15, 2025
This protects against an integer overflow which could occur for large key list size and large thread counts. Regrettably, it's difficult to write a regression test for this scenario, as exercising this overflow requires lots of time and heap, so it would be a performance regression to our test suites. Fixes bazelbuild#19445 PiperOrigin-RevId: 595420516 Change-Id: Ic0a475a6a273c50fe9895dd0852fa5b062859cb2
A fix for this issue has been included in Bazel 7.5.0 RC2. Please test out the release candidate and report any issues as soon as possible. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug:
The function
runInternal
inInvalidatingNodeVisitor.DeletingNodeVisitor
contains the following fragment:In a very large project that is build on a machine with many cores the expression
((index + 1) * listSize) / numThreads)
sometimes becomes negative, presumably due to a numeric overflow. Which then crashes in the call tosubList
.Which category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Unfortunately I do not have a reproducer. This happens non-deterministically, and only in builds that have already ran for 1 1/2 hours. But I have included a stack trace below, and it shows that the second argument to
subList
becomes negative.Which operating system are you running Bazel on?
Linux, version 3.10.0-1160.95.1.el7.x86_64
What is the output of
bazel info release
?release 6.3.2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
The stack trace in the moment of the crash:
The text was updated successfully, but these errors were encountered: