Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684452 - media-video/ffmpeg-3.4.5 with sys-devel/gcc-8 and LTO - segmentation fault in ff_sine_window_init
Summary: media-video/ffmpeg-3.4.5 with sys-devel/gcc-8 and LTO - segmentation fault in...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: media-video herd
Keywords: PATCH
Depends on:
Reported: 2019-04-27 00:01 UTC by Alexander Miller
Modified: 2019-04-27 10:49 UTC (History)
0 users

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

ffmpeg-3.4-segfault.patch (ffmpeg-3.4-gcc8-lto-crash.patch,2.99 KB, patch)
2019-04-27 00:01 UTC, Alexander Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Miller 2019-04-27 00:01:40 UTC
Created attachment 574330 [details, diff]

After rebuilding media-video/ffmpeg-3.4.5 with a newer toolchain I got segfaults for most videos I tried to play (with ffplay or mplayer). I found the following upstream commit that addresses the issue but is missing from the 3.4 branch:
The attached patch based on that commit (changes to version.h disabled because they don't apply) fixes the issue for me.

The (unpatched) code writes to some arrays which are declared "const", so it's no surprise this causes segfaults. I think this should be fixed in the stable version even though it apparently works by chance with some toolchains and CFLAGS.