Skip to content

co_reduce: Segfault with -Wl,-z,noexecstack #317

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

Closed
vehre opened this issue Jan 20, 2017 · 4 comments · Fixed by #367
Closed

co_reduce: Segfault with -Wl,-z,noexecstack #317

vehre opened this issue Jan 20, 2017 · 4 comments · Fixed by #367
Assignees
Labels

Comments

@vehre
Copy link
Collaborator

vehre commented Jan 20, 2017

Forking this issue from #172, because this is something different. Let's track the noexecstack issue here.

@zbeekman
Copy link
Collaborator

zbeekman commented Feb 8, 2017

Do you think this might be due to the global procedure pointer? I'm wondering if fixing #324 might fix this, but that's somewhat wild speculation on my part

@vehre
Copy link
Collaborator Author

vehre commented Apr 23, 2017

Comment 1 gives a good explanation why and when this is happening.
Unfortunately can't we do anything about it, beside compiling with executable stack. This means, that we need to override the -Wl,-z,noexecstack given at the compiler command line at least when compiling Debug or RelWithDebInfo for at least MPICH (haven't tested for OpenMPI yet). This can be done by adding -Wl,-z,execstack to the compiler command line. I could figure how to do this in the CMakeLists.txt and the caf-driver, but I assume, that one of your @zbeekman or @rouson is faster doing so. Therefore am I asking you to do it.

@vehre vehre assigned zbeekman and rouson and unassigned vehre Apr 23, 2017
@zbeekman
Copy link
Collaborator

@vehre: Great, I'd be happy to work on this. Do you think we should just always add -Wl,-z,execstack, or should I try to parse the linker flags and remove -z,noexecstack if it is present? (This latter approach is possible because FindMPI extracts the compiler and linker flags from the mpi wrapper scripts so we could, in theory, search them and remove the -z,noexecstack linker flag if it is present.)

@vehre
Copy link
Collaborator Author

vehre commented Apr 23, 2017

@zbeekman I leave the decision of what is easier to you. As to know the compiler accepts having noexecstack and execstack on the command line.
The only issue we have, when both are on the command line is, that execstack must come after noexecstack. When you can assure the latter, then feel free to just add it.

zbeekman added a commit that referenced this issue Apr 25, 2017
zbeekman added a commit that referenced this issue Apr 25, 2017
Check for and remove `noexecstack` added by MPI

Fixes #317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants