JonChesterfield wrote:

Finally managed to reproduce the libc failure. Thanks to Joseph for helping 
debug through the cmake. This patch as written was too optimistic about 
addrspacecast, a significantly more paranoid version behaves correctly (i.e. 
all the libc tests pass, this patch can be amended to enable the variadic ones 
on amdgpu). Libc tests don't seem to pick up changes to clang without a clean 
build (i.e. delete the whole build tree).

The memory error was on the dereference implied by va_arg. Valid addresses 
(read as void*) have a high bit pattern of 00002..... and invalid ones of 
fffff....., I'm unsure what that implies. I note that 
https://llvm.org/docs/AMDGPUUsage.html doesn't say much about the semantics of 
addrspace.

Trying to isolate that further. The error is definitely in the amdgpu-specific 
addrspace handling part though, the target agnostic part worked as intended.

https://github.com/llvm/llvm-project/pull/93362
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to