Skip to content
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

std.math.big.int.Managed: adjust size of arg for limbs_buffer in format() #19959

Merged
merged 6 commits into from
May 21, 2024

Conversation

poypoyan
Copy link
Contributor

Fixes: #19787

Error occurs because in the current code, the size of limbs (hard-coded to 128) can be less than the calcToStringLimbsBufferLen, which is the minimum according to toString() documentation.

Also updated the doc and added tests for "(BigInt)" printing.

squeek502 and others added 3 commits May 13, 2024 23:52
… default location

Information about installed MSVC instances are stored in `state.json` files within a `Packages/_Instances` directory. The default location for this is `%PROGRAMDATA%\Microsoft\VisualStudio\Packages\_Instances`. However, it is possible for the Packages directory to be put somewhere else. In that case, the registry value `HKLM\SOFTWARE\Microsoft\VisualStudio\Setup\CachePath` is set and contains the path to the Packages directory.

Previously, WindowsSdk did not check that registry value. After this commit, the registry value `HKLM\SOFTWARE\Microsoft\VisualStudio\Setup\CachePath` is checked first, which matches what ISetupEnumInstances does (according to a Procmon log).
Now, an options struct is used to determine whether or not KEY_WOW64_32KEY should be set when opening a registry key.
@poypoyan poypoyan changed the title std.math.big.int.Managed: adjust limbs_buffer size std.math.big.int.Managed: adjust size of arg for limbs_buffer in format() May 14, 2024
@Vexu Vexu enabled auto-merge (squash) May 21, 2024 10:43
@Vexu Vexu merged commit aa07366 into ziglang:master May 21, 2024
10 checks passed
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.

std.math.big.int.Managed: panic during printing of large integers
3 participants