-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Integer overflow in totalSystemMemory on 32-bit Linux systems #25038
Copy link
Copy link
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.os-linuxLinuxLinuxstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.os-linuxLinuxLinuxstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Zig Version
0.15.1
Steps to Reproduce and Observed Behavior
On a system with 96GB of RAM, run:
Further, when trying to limit memory usage using
--maxrss 24GI am very limited as the parsing of this argument returns a usize for a u64. This might be an issue of my system. I ran a little test and usize is a u32.Expected Behavior
The integer not to overflow or the catch at
compiler/build_runner.zig:435to apply the max u64 as a fallback.