Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656720 - games-emulation/advancemame-3.7: stack smashing detected
Summary: games-emulation/advancemame-3.7: stack smashing detected
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-05-27 22:57 UTC by Tear♪
Modified: 2024-05-13 23:17 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tear♪ 2018-05-27 22:57:56 UTC
This version of AdvanceMAME gets killed at startup with the message:
*** stack smashing detected ***: <unknown> terminated

This issue has been submitted to RetroPie (Ubuntu-based emulation OS) support forums 5 months ago:
https://retropie.org.uk/forum/topic/15289/advance-mame-won-t-make-a-working-compile-on-ubuntu-17-10/2

Their solution was to build it with -fno-stack-protector:
https://pow.gs/mirror/RetroPie-Setup/commit/7520c88df5938207bac523d080cf678ad00bbf22
I can confirm that this works around what appears to be an upstream bug and results in a functional binary; I'm not sure if we want to resort to an ugly hack like this, though. I can provide a backtrace, depending on whether we decide to hack around this or attempt to patch it.
Comment 1 Mark Davies 2023-01-16 22:26:13 UTC
For me (advancemame-3.9) the problem was a incorrect size being passed to a EVIOCGBIT ioctl, for a fix see https://github.com/amadvance/advancemame/commit/4484c8bad4e297b6e0af416b7924d286a3105b6b
Comment 2 Alex Barker 2023-01-19 17:16:50 UTC
(In reply to Mark Davies from comment #1)
> For me (advancemame-3.9) the problem was a incorrect size being passed to a
> EVIOCGBIT ioctl, for a fix see
> https://github.com/amadvance/advancemame/commit/
> 4484c8bad4e297b6e0af416b7924d286a3105b6b

So I am guessing this would be resolved with whatever the next release is after 3.9.
Comment 3 Mark Davies 2023-01-20 18:31:19 UTC
(In reply to Alex Barker from comment #2)
> 
> So I am guessing this would be resolved with whatever the next release is
> after 3.9.

Yes but the last release was in 2018 so I would not expect a new one.

Currently I have it as a "user patch", as a ebuild fix you could add the change to the other "Patches from upstream" https://github.com/gentoo/gentoo/blob/master/games-emulation/advancemame/advancemame-3.9.ebuild#L41
Comment 4 Thomas Capricelli 2024-05-13 23:17:54 UTC
Er... ok. What can we do ? I have the same problem, but I don't really understand the fixes/workaround on this ticket.

According to their homepage, advancemame has released 3.10. Maybe a bump would solve this issue ?