!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1203 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org201 Servers

Load older messages


SenderMessageTime
4 Apr 2026
@emilazy:matrix.orgemily try it with -O0 with the old compiler 20:16:46
@emilazy:matrix.orgemily since if it is that commit, it'd be an incorrect optimization in LLVM somehow causing it to not crash 20:17:01
@emilazy:matrix.orgemilyseems bizarre but who knows20:17:10
@emilazy:matrix.orgemily it could ofc be anything else in the stdenv.cc closure too 20:17:25
@emilazy:matrix.orgemily(linker stuff…?)20:17:38
@reckenrode:matrix.orgRandy EckenrodeDoes it crash with LLVM 22?20:17:45
@esperlily:matrix.orgEsperLily [she/her]i'll try that after i do this build with the old compiler20:18:13
@esperlily:matrix.orgEsperLily [she/her]this works fine, no crash20:21:40
@emilazy:matrix.orgemily then I guess it's not https://github.com/llvm/llvm-project/commit/d2e835bd46384aa1628c9d44e3f93438f0795dfd. well, that or your CFLAGS aren't reaching the right part of the build 20:22:13
@emilazy:matrix.orgemily I would perhaps try the staging commit immediately before the 21.1.8 merge and the 21.1.8 merge commit itself 20:22:51
@emilazy:matrix.orgemilyif those differ then it really does have to be something in https://github.com/llvm/llvm-project/compare/llvmorg-21.1.7...llvmorg-21.1.8 somehow20:23:20
@emilazy:matrix.orgemilyif not… well, it's a start on bisecting the cycle20:23:29
@esperlily:matrix.orgEsperLily [she/her] i I run path/to/Vim --version it reports its own CFLAGS as being what I set (plus a few -D flags) 20:26:23
@emilazy:matrix.orgemilyyeah, but maybe it's something other than that binary? dunno20:26:48
@emilazy:matrix.orgemilynon-weird possibilities are pretty much eliminated so whatever it is has to be weird in some way20:27:02
@esperlily:matrix.orgEsperLily [she/her]sadly yes20:27:51
@esperlily:matrix.orgEsperLily [she/her] I used final.llvmPackages_22.stdenv and it still crashes 20:28:02
@emilazy:matrix.orgemilyI think this will be the best next step, since if it narrows it down to that one merge then there's a very short list of commits that could have caused the regression.20:32:20
@emilazy:matrix.orgemily though it seems basically incomprehensible for it to be anything other than the llvm/lib/CodeGen/SelectOptimize.cpp change if it is 20:33:12
@esperlily:matrix.orgEsperLily [she/her] trying to build from the staging commit immediately before the 21.1.8 merge means recompiling a lot of stuff. from the source tarballs i'm seeing it download right now it looks like it'll be compiling llvm and rust and python3 and a bunch of other stuff. actually doing this is going to take quite a long time 20:36:32
@emilazy:matrix.orgemilyyeah it takes a few hours20:36:49
@emilazy:matrix.orgemily you can use https://hydra.nixos.org/jobset/nixpkgs/staging to try and find commits that got at least stdenv built 20:37:13
@emilazy:matrix.orgemily but no way around doing a lot of builds to bisect a staging regression usually 20:37:31
@emilazy:matrix.orgemilyespecially if there's issues elsewhere in the closure masking whatever introduced the issue, then you need to backport the fix to the earlier commits20:37:57
@esperlily:matrix.orgEsperLily [she/her]does hydra make the results of staging builds available in the binary cache?20:41:09
@emilazy:matrix.orgemilyyes, everything Hydra builds goes into the cache20:52:30
@emilazy:matrix.orgemily but it only builds stdenv on staging, everything downstream of that needs to be built yourself 20:52:43
@emilazy:matrix.orgemilyand it doesn't necessarily build every commit (and even for commits it tries to build, they can get cancelled/time out/fail for reasons not related to whatever you're trying to diagnose; the last case is when you may need to backport later fixes when bisecting)20:53:17
@emilazy:matrix.orgemilyit's still a lot less painful than before it did that though20:53:33
@esperlily:matrix.orgEsperLily [she/her]

ugh ok wtf. I finally figured out what it's crashing on. The code in question allocates a struct whose last field is defined like char uf_name[4], but it allocates more than the size of this struct based on the actual length of the function name. And then the code does this

	// Add a type cast to avoid a warning for an overflow, the uf_name[] array
	// can actually extend beyond the struct.
	STRCPY((void *)fp->uf_name, name);

(where STRCPY(d, s) is a macro that evalutes to strcpy((char *)(d), (char *)(s)))
so it's casting away the array length, but the actual compiled code invokes __strcpy_chk(fp->uf_name, name, 4), which itself invokes strcpy and then checks how much it copied and whether that was more than 4. The working version just calls strcpy instead of __strcpy_chk.

21:06:29

Show newer messages


Back to Room ListRoom Version: 6