Giter VIP home page Giter VIP logo

Comments (9)

andrewrk avatar andrewrk commented on May 29, 2024 7

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.

paperdave avatar paperdave commented on May 29, 2024

this seems to be a widespread regression. maybe it is #19052

ran into this while building ghostty, an older commit works.

image

from zig.

andrewrk avatar andrewrk commented on May 29, 2024

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.

llogick avatar llogick commented on May 29, 2024

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.

mgord9518 avatar mgord9518 commented on May 29, 2024

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.

angaz avatar angaz commented on May 29, 2024

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.

linusg avatar linusg commented on May 29, 2024

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.

Cloudef avatar Cloudef commented on May 29, 2024

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.

andrewrk avatar andrewrk commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.