Comments (9)
OK I see the problem, I introduced this regression when I put
const connection = req.connection.?;
at the top of the wait
function. Fix coming shortly after I produce a unit test to cover this behavior.
from zig.
this seems to be a widespread regression. maybe it is #19052
ran into this while building ghostty, an older commit works.
from zig.
Hmm I am unable to reproduce the problem with these URLs. I will try building some more projects myself to see if I can trigger the problem.
from zig.
Hmm I am unable to reproduce the problem with these URLs. I will try building some more projects myself to see if I can trigger the problem.
FWIW try it with the one available for download and not a locally built one; also - seems to be linux only, as the mac and windows workflows succeed.
from zig.
Also got this issue. First noticed when my projects with CI failed to build with segfaults or network errors although I seemingly had no issue on my Linux machine (which also has the latest version of Zig).
Cleared my cache and sure enough, it either hangs or fails with HttpHeadersOversize
. So it should be pretty easy to reproduce on a Linux machine, just make sure old Zig build caches are removed
from zig.
Can confirm it's broken with zig-0.12.0-dev.2922+774487038
- 2024-02-24, but works fine with zig-0.12.0-dev.2834+30f15e3af
- 2024-02-23
from zig.
zig build
started segfaulting in kiesel's CI as well (e.g. https://codeberg.org/kiesel-js/kiesel/actions/runs/1216/jobs/0), same last known good and first known bad versions as @angaz.
from zig.
Not sure if related but zig2nix's CI is also blocking zig updates as there seems to be a regression in the package manager:
https://github.com/Cloudef/zig2nix/actions/runs/8034469750/job/21946100082#step:5:401
from zig.
Looks like a UAF having to do with the connection pool.
==190130== Invalid read of size 2
==190130== at 0x6C22F2A: http.Client.Connection.fill (Client.zig:253)
==190130== by 0x66310AA: http.Client.Request.wait (Client.zig:864)
==190130== by 0x62677FF: Package.Fetch.initResource (Fetch.zig:917)
==190130== by 0x5F7C5D9: Package.Fetch.run (Fetch.zig:358)
==190130== by 0x5F79D35: main.cmdFetch (main.zig:7497)
==190130== by 0x5C9B5CA: main.mainArgs (main.zig:318)
==190130== by 0x5C97965: main.main (main.zig:223)
==190130== by 0x5C973DE: callMain (start.zig:511)
==190130== by 0x5C973DE: callMainWithArgs (start.zig:469)
==190130== by 0x5C973DE: main (start.zig:484)
==190130== Address 0x109e8070 is 48 bytes inside a block of size 33,352 free'd
==190130== at 0x10582F6C: free (in /nix/store/x355022fa5271j95sxd9wk7k5frwxxh1-valgrind-3.20.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==190130== by 0x5CCD107: heap.rawCFree (heap.zig:219)
==190130== by 0x65D3394: rawFree (Allocator.zig:98)
==190130== by 0x65D3394: mem.Allocator.destroy__anon_94707 (Allocator.zig:117)
==190130== by 0x6C2260F: http.Client.ConnectionPool.release (Client.zig:117)
==190130== by 0x6C228F0: http.Client.Request.redirect (Client.zig:669)
==190130== by 0x6631F81: http.Client.Request.wait (Client.zig:982)
==190130== by 0x62677FF: Package.Fetch.initResource (Fetch.zig:917)
==190130== by 0x5F7C5D9: Package.Fetch.run (Fetch.zig:358)
==190130== by 0x5F79D35: main.cmdFetch (main.zig:7497)
==190130== by 0x5C9B5CA: main.mainArgs (main.zig:318)
==190130== by 0x5C97965: main.main (main.zig:223)
==190130== by 0x5C973DE: callMain (start.zig:511)
==190130== by 0x5C973DE: callMainWithArgs (start.zig:469)
==190130== by 0x5C973DE: main (start.zig:484)
==190130== Block was alloc'd at
==190130== at 0x1058079B: malloc (in /nix/store/x355022fa5271j95sxd9wk7k5frwxxh1-valgrind-3.20.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==190130== by 0x5CCD062: heap.rawCAlloc (heap.zig:187)
==190130== by 0x5FA7053: rawAlloc (Allocator.zig:86)
==190130== by 0x5FA7053: mem.Allocator.allocBytesWithAlignment__anon_62125 (Allocator.zig:225)
==190130== by 0x75C8435: mem.Allocator.create__anon_146563 (Allocator.zig:105)
==190130== by 0x7126F3B: http.Client.connectTcp (Client.zig:1240)
==190130== by 0x6C1F6FB: http.Client.connect (Client.zig:1415)
==190130== by 0x662DF01: http.Client.open (Client.zig:1549)
==190130== by 0x626763C: Package.Fetch.initResource (Fetch.zig:901)
==190130== by 0x5F7C5D9: Package.Fetch.run (Fetch.zig:358)
==190130== by 0x5F79D35: main.cmdFetch (main.zig:7497)
==190130== by 0x5C9B5CA: main.mainArgs (main.zig:318)
==190130== by 0x5C97965: main.main (main.zig:223)
from zig.
Related Issues (20)
- `error: TODO: implement @ptrCast between slices changing the length`
- Compiler allows initialisation of enum types with invalid enum Values HOT 1
- Runtime safety check added in comptime block HOT 2
- Cannot `@cImport` `windows.h` when targetting `msvc` abi HOT 5
- Errdefer payload type doesn't match function signature
- `callconv(.Naked)` functions with parameters cause silent LLVM crash when compiling for PowerPC
- default local cache directory to `.zig-cache` instead of `zig-cache` HOT 4
- std.debug.bufPrintZ padding on the wrong side of output
- observed error.Unexpected NTSTATUS=0xc0000056 (DELETE_PENDING) in makeOpenDirAccessMaskW
- add `math.approxEqUlp` for numerical precision testing
- Missing error for runtime `@ptrFromInt` to comptime-only type HOT 2
- ReleaseSafe panic error trace points at line 0 when freeing an undefined pointer HOT 4
- Zig does not report errors or sliently fails on `.S` / `assembler_with_cpp` files
- Can't link on PPC64LE HOT 1
- ErrorUnion typeInfo debug print causes GenericPoison HOT 2
- @cInclude("stdio.h") doesn't work for -Dtarget=wasm32-emscripten
- Unsure how to handle duplicate symbol linker error
- SIGTRAP When attempting to write to a runtime index in comptime variable HOT 1
- Undefined struct fields are initialized to 0 instead of 0xAA in debug mode (with llvm backend)
- zig fetch -h should include examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zig.