Repository navigation
fix: reject non-finite and out-of-range geometry in gin converters - #54216
Merged
MarshallOfSound merged 1 commit intoSep 25, 2026
Merged
Conversation
xia-chao
force-pushed
the
fix/setbounds-overflow-crash
branch
from
September 22, 2026 21:47
cd26fc5 to
4c523ad
Compare
Member
|
in conflict |
xia-chao
force-pushed
the
fix/setbounds-overflow-crash
branch
from
September 24, 2026 18:07
4c523ad to
fd259de
Compare
Contributor
|
For more information on signing commits, see GitHub's documentation on Telling Git about your signing key. |
Non-finite values (NaN, Infinity) were silently coerced to 0. Huge values like -1e10 saturated to INT_MIN and can crash AppKit on setBounds. Assisted-By: MiMo, MiMo Desktop
xia-chao
force-pushed
the
fix/setbounds-overflow-crash
branch
from
September 24, 2026 18:11
fd259de to
a1e440b
Compare
MarshallOfSound
approved these changes
Sep 24, 2026
codebytere
approved these changes
Sep 25, 2026
|
Release Notes Persisted
|
Contributor
|
I was unable to backport this PR to "45-x-y" cleanly; |
3 tasks done
3 tasks done
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Non-finite and out-of-range values passed to geometry APIs (
setBoundsand friends) were silentlyaccepted instead of rejected.
Rect,Point, andInsetsingfx_converter.ccnow validate likeSizealready did in the same file. Fractional bounds such asx: 440.5still work.Adds one spec covering
NaN,±Infinity, and-1e10.Built and tested
Built from this branch on a self-hosted 64-core / 128 GB machine. No Electron CI was used.
Full evidence — crash log, build output, spec output, debugger session, screenshots
Crash on the published binary (no build needed)
Exit code
133(128 + SIGTRAP(5)). Noteframe={{-2147483648, ...}}—xis exactlyINT_MIN,confirming the float-to-int saturation path rather than a rounding artifact.
try/catchcannotintercept this.
NaNdoes not crash but is silently coerced to0.Build output
Spec output — repository's own runner, unmodified spec files
--no-sandboxis required because Chromium refuses to start as root; it is a runner argument andno test or product code was modified for it.
Individual input checks (built binary, direct call)
Screenshots
Build server and build result (64 cores, 41031 targets, 0 failed):
Official spec passing:
Debugger — source breakpoint at
gfx_converter.cc:110, value alreadyNaNon entry toToRoundedRect:Call stack through
gin::Converter<gfx::Rect>::FromV8→BaseWindow::setBounds:Debug console —
BEFOREbounds printed, thenTRIGGER:Checklist
npm testpassesRelease Notes
Notes: Window geometry APIs now reject non-finite and out-of-range values.