| Summary: | games-emulation/zsnes-1.51-r4 crashes with segmentation fault in libc-2.18.so on startup | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | nvinson234 |
| Component: | [OLD] Games | Assignee: | Gentoo Games <games> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | Keywords: | PATCH |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| URL: | https://bugs.archlinux.org/task/36556 | ||
| See Also: | https://bugs.gentoo.org/show_bug.cgi?id=488918 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
zsnes stack realignment patch
emerge --verbose --info zsnes |
||
|
Description
nvinson234
2014-03-01 17:34:18 UTC
This is actually a duplicate of the archlinux bug (sorry, I didn't follow the URL in 488918 until just now). However, instead of patching glibc, I'll use the oppertunity to propose a patch for zsnes just in case my supposition in the additional notes section is correct. Created attachment 371508 [details, diff]
zsnes stack realignment patch
This patch instructs gcc to realign the stack to a 16-byte boundary when startgame() is called. This patch allows zsnes to run correctly without the need to patch glibc.
Created attachment 371510 [details]
emerge --verbose --info zsnes
For me (on Haswell/~amd64) it used to work without until yesterday or so but a world update broke it again. Segfault on startup - gone with your patch. Thanks... ok, patch is in portage. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c068f68557e6a0d7d2f5232221900205076429aa commit c068f68557e6a0d7d2f5232221900205076429aa Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-07-06 22:32:25 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-07-06 22:33:09 +0000 games-emulation/zsnes: apply stack realignment to more functions Expand existing stack realignment hack to more C functions that get called from early init assembly. Fixes zsnes startup for me. Bug: https://bugs.gentoo.org/503138 Package-Manager: Portage-2.3.41, Repoman-2.3.9 .../zsnes/files/zsnes-1.51-stack-align-v2.patch | 56 ++++++++++ games-emulation/zsnes/zsnes-1.51-r7.ebuild | 122 +++++++++++++++++++++ 2 files changed, 178 insertions(+) |