Skip to content

Fix ABI violation on ppc64 ELFv2, fixes #72#106

Merged
olk merged 1 commit intoboostorg:developfrom
shawnanastasio:ppc64_elfv2_fix
May 4, 2019
Merged

Fix ABI violation on ppc64 ELFv2, fixes #72#106
olk merged 1 commit intoboostorg:developfrom
shawnanastasio:ppc64_elfv2_fix

Conversation

@shawnanastasio
Copy link
Contributor

The existing ontop_fcontext implementation for ppc64 ELFv2
violates the ABI by not storing the callback entry address
in %r12 before branching. This results in crashes on this
platform.

This commit addresses this and allows the context library
to function as expected on ppc64 platforms using the ELFv2 ABI.

The OpenPOWER ELFv2 ABI states on page 41, section 2.2.1.1: "r12 [...] Function entry address at the global entry point."

The existing ontop_fcontext implementation for ppc64 ELFv2
violates the ABI by not storing the callback entry address
in %r12 before branching. This results in crashes on this
platform.

This commit addresses this and allows the context library
to function as expected on ppc64 platforms using the ELFv2 ABI.
@q66
Copy link

q66 commented May 4, 2019

I can confirm that the testsuite passes now (testing on Linux, POWER8 little endian).

q66 added a commit to OctaForge/libostd that referenced this pull request May 4, 2019
@wak-google
Copy link

This is exactly what I was seeing as the issue, thanks.

@olk
Copy link
Member

olk commented May 4, 2019

ty

@olk olk merged commit d4608a4 into boostorg:develop May 4, 2019
r-burns added a commit to r-burns/nixpkgs that referenced this pull request Oct 21, 2020
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.
r-burns added a commit to r-burns/nixpkgs that referenced this pull request Oct 22, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants