-
Notifications
You must be signed in to change notification settings - Fork 108
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
Segfault on powerpc64le for trivial example #193
Comments
I can use an even more trivial example....
|
It looks like any application using fibers should be sufficient to hit this issue, even the examples/simple.cpp will hit this. |
The code for powerpc64 was contributed b several other developers. |
I tried the unit tests on powerpc64le (to the best of my knowledge, I have no idea how your build system works) after hitting the Nix crash referenced above, and it didn't fail. I don't have a BE system setup to test that. |
|
Might be a little more helpful to do a debug build
|
Something is entirely wrong here as we are jumping to null inside of std::free() |
Something is breaking the indirect call into the hidden_proto __libc_free from the plt_call.free |
at the point of doing bctr, ctr is 0x0
|
Doing a lookup on r12 + 31568 prior to the load I'm getting on a working program where it would load r12 + 32760 I get so it looks like the jump table offsets might be okay but the table is getting zero'd out? |
Okay so we are using a different PLT during the corruption
|
It's a problem in boost.context PowerPC implementation - unfortunately I should debug the example code in order to locate the bug - but without a PowerPC64 system... (maybe I get a qemu-powerpc64-image running). |
@olk any news about this? I can provide access to a ppc64le based system is necessary |
Here are bits of log when the code was discussed, maybe it'll help
|
unfortunately no, I'm too busy |
I also further found out that in my minimal testcase with a simple coroutine implementation, everything works except 1 case, which is when a paused coroutine is force destroyed (i.e. |
I have submitted a fix here. The |
ty |
Fixes NixOS/nix#2517 See also: boostorg/context#72 boostorg/fiber#193 These issues have been resolved by: boostorg/context#106 boostorg/context@d4608a4 which is merged into boost as of v1.71.0. This feature was introduced (with the bug) in boost v1.61 and was fixed in v1.71. So we apply the patch to all versions in that range.
Fixes NixOS/nix#2517 See also: boostorg/context#72 boostorg/fiber#193 These issues have been resolved by: boostorg/context#106 boostorg/context@d4608a4 which is merged into boost as of v1.71.0. This feature was introduced (with the bug) in boost v1.61 and was fixed in v1.71. So we apply the patch to all versions in that range.
The following code works fine on amd64 but causes segfaults on powerpc64le based platforms. I don't think this is a particularly interesting code segment but all of the code I'm using which depends on boost fibers is encountering issues with the same code path as far as I can tell.
Compiled with:
boost 1.69.0
gcc 7.3.0
glibc 2.27
Fails at:
The text was updated successfully, but these errors were encountered: