-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix overflow in GetHexStringCore #111296
Fix overflow in GetHexStringCore #111296
Conversation
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
Just want to ask: I have a similar hex parsing overflow fix for |
2.0 GB is iffy. You should probably work with the area owners on figuring out the right thing to do to decide how critical it is to have test coverage for the scenario. I would expect a 2.0 gig allocation to fail on mobile platforms (iOS and tvOS) and stress Linux. Linux's behavior can be unfortunate the oomkiller might just abort the whole test run. (TL;dr on oomkiller: sometimes a large allocation will succeed, but Linux will decide that it is starved for memory, and just do a #100558 is an example of where a 2 GB allocation was aborting test runs. |
Thanks. I thought there was a repo-wide consensus/policy on memory-consuming tests. |
/ba-g The Windows 8.1 queue seems to be backed up. This change would not uniquely impact that OS, so signing off based on the successful legs. |
If
destination
's length isint.MaxValue
, adding 1 will overflow it. To address this, we can use an unsigned shift to the right by one instead of dividing by two.I don't think it is particularly feasible to unit test this - it would require allocating a 4GB span. Generally those yield unstable tests in CI.