Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
test: nilptr.go fails on ppc64le when externally linked #13436
"go run run.go -linkshared -- nilptr.go" fails with "panic: dummy too far out" but so does "go run -ldflags=-linkmode=external". The test says
but the system linker seems uninclined to put such a large object so low in the address space.
Indeed, I found it when running things with -linkshared in test.
Surprisingly enough, this is the only spurious failure I see (or saw when I ran this a few weeks back) on any platform that supports -buildmode=shared. (I found some other things but they were real bugs).
Yeah, I think it's the external linker doing something deliberate but slightly surprising. Skipping nilptr when -linkshared is passed would be a perfectly adequate fix I think.