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...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-04-27 00:01 UTC by Alexander Miller
Modified: 2019-10-02 10:31 UTC (History)
0 users

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


Attachments
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]
ffmpeg-3.4-segfault.patch

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:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/10f468156c0109a06854b5d672c5209a88923ce9
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.
Comment 1 Alexis Ballier gentoo-dev 2019-10-02 10:31:33 UTC
This is fixed in 4.1.3 and later versions