tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: 2025Q2 branch status; wasi-libc
On Fri, Jun 27, 2025 at 10:53:48AM +0200, Benny Siegert wrote:
> lang/wasi-libc was broken on NetBSD 9/amd64 back in May by the update
> of LLVM to version 19. Crucially, this means no Firefox and no
> Thunderbird on this platform.
> The latest failure was https://releng.netbsd.org/bulktracker/pkg/54419667:
>
> libc-bottom-half/cloudlibc/src/libc/dirent/fdopendir.c:12:6: error:
> Invalid address space for WebAssembly target
> 12 | DIR *fdopendir(int fd) {
> | ^
> libc-bottom-half/crt/crt1-command.c:11:6: error: Invalid address space
> for WebAssembly target
[...]
> Any ideas on this one? I cannot even find an explanation of this
> compiler error on Google.
I believe this is referring to "addrspace":
https://llvm.org/docs/NVPTXUsage.html#address-spaces
and appears in the intermediate representations as eg
@a = hidden global ptr addrspace(10) null, align 1
however! I would note that further down in the build log for lang/wasi-libc,
there's an actual llvm *crash*:
In file included from dlmalloc/src/dlmalloc.c:63:
dlmalloc/src/malloc.c:4568:7: error: Invalid address space for WebAssembly target
4568 | void* dlmalloc(size_t bytes) {
| ^
fatal error: error in backend: Cannot select: 0x773c8604d000: i32 = addrspacecast[8384488 -> 8364456] 0x773c8604d700
0x773c8604d700: i32 = WebAssemblyISD::Wrapper TargetGlobalAddress:i32<ptr addrspace(8384488) @_gm_> 0
0x773c8604d690: i32 = TargetGlobalAddress<ptr addrspace(8384488) @_gm_> 0
In function: dlmalloc
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
why this would only appear in NetBSD 9 is bizarre, and I *suspect*
is related to the compiler used to build llvm itself; I'd be
interested to see what would happen if llvm were built using a later
version of gcc.
Home |
Main Index |
Thread Index |
Old Index