Zig Version
0.16.0-dev.1225+bf9082518
Steps to Reproduce and Observed Behavior
- Download
0.16.0-dev.1225+bf9082518 for Windows x86_64.
- Create a new project using
zig init.
- Initiate a build using the command
zig build -Doptimize=ReleaseSafe.
- Failed.
Windows (Failed)
zig build -Doptimize=ReleaseSafe -freference-trace=12
C:\Program Files\zig\lib\std\Build\WebServer.zig:795:38: error: expected type 'usize', found 'u64'
const buf = gpa.realloc(old_buf, new_len) catch @panic("out of memory");
^~~~~~~
C:\Program Files\zig\lib\std\Build\WebServer.zig:795:38: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
C:\Program Files\zig\lib\std\mem\Allocator.zig:389:58: note: parameter type declared here
pub fn realloc(self: Allocator, old_mem: anytype, new_n: usize) t: {
^~~~~
referenced by:
spawnChildAndCollect: C:\Program Files\zig\lib\std\Build\Step\Run.zig:1592:47
runCommand: C:\Program Files\zig\lib\std\Build\Step\Run.zig:1234:52
make: C:\Program Files\zig\lib\std\Build\Step\Run.zig:971:23
create: C:\Program Files\zig\lib\std\Build\Step\Run.zig:199:14
addRunArtifact: C:\Program Files\zig\lib\std\Build.zig:947:37
build: build.zig:105:37
runBuild__anon_43861: C:\Program Files\zig\lib\std\Build.zig:2234:33
main: C:\Program Files\zig\lib\compiler\build_runner.zig:462:29
callMain [inlined]: C:\Program Files\zig\lib\std\start.zig:696:37
WinStartup: C:\Program Files\zig\lib\std\start.zig:513:53
comptime: C:\Program Files\zig\lib\std\start.zig:68:30
start: C:\Program Files\zig\lib\std\std.zig:107:27
Linux (Success)
Expected Behavior
It should be built normally.
I'm not sure how this happened, as this bug has never appeared before. The Linux version does not exhibit this bug.
Zig Version
0.16.0-dev.1225+bf9082518
Steps to Reproduce and Observed Behavior
0.16.0-dev.1225+bf9082518for Windows x86_64.zig init.zig build -Doptimize=ReleaseSafe.Windows (Failed)
Linux (Success)
Expected Behavior
It should be built normally.
I'm not sure how this happened, as this bug has never appeared before. The Linux version does not exhibit this bug.