Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: nilptr.go fails on ppc64le when externally linked #13436

Open
mwhudson opened this issue Dec 1, 2015 · 2 comments

Comments

@mwhudson
Copy link
Contributor

commented Dec 1, 2015

"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

        // the test only tests what we intend to test
        // if dummy starts in the first 256 MB of memory.

but the system linker seems uninclined to put such a large object so low in the address space.

@rsc rsc added this to the Go1.6Maybe milestone Dec 28, 2015

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 28, 2015

How does this come up? It sounds like it doesn't happen in the standard build. I don't expect everything in the test directory to work with -linkshared. This could just be working as expected.

@mwhudson

This comment has been minimized.

Copy link
Contributor Author

commented Jan 4, 2016

How does this come up? It sounds like it doesn't happen in the standard build.

Indeed, I found it when running things with -linkshared in test.

I don't expect everything in the test directory to work with -linkshared.

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).

This could just be working as expected.

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.

@rsc rsc modified the milestones: Unplanned, Go1.6Maybe Jan 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.