Created attachment 475170 [details, diff] Slightly backported upstream commit 0ae66d565e6bead8604d312bc1a4e9dccf245c88 GCC 4.8 uses aggressive loop optimization by default. This triggers undefined behaviour in libtheora /var/tmp/portage/media-libs/libtheora-1.1.1-r1/work/libtheora-1.1.1/lib/decode.c: In function ‘th_decode_alloc’: /var/tmp/portage/media-libs/libtheora-1.1.1-r1/work/libtheora-1.1.1/lib/decode.c:400:49: warning: iteration 2u invokes undefined behavior [-Waggressive-loop-optimizations] qsum+=_dec->state.dequant_tables[qti][pli][qi][12]+ ^ /var/tmp/portage/media-libs/libtheora-1.1.1-r1/work/libtheora-1.1.1/lib/decode.c:396:3: note: containing loop for(qi=0;qi<64;qi++){ ^ This was fixed upstream five years ago [0] but no release was made since then. Please apply this patch, thanks. Attached the slightly backported patch (thunk header line was changed from 400 to 397 to match the libtheora-1.1.1 tarball; without this change the patch still applies but issues a hunk offset warning). [0] https://git.xiph.org/?p=theora.git;a=commit;h=0ae66d565e6bead8604d312bc1a4e9dccf245c88
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92a952a998d41206b6af06fe2d9c3eb9ab2e3f4a commit 92a952a998d41206b6af06fe2d9c3eb9ab2e3f4a Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2018-10-03 23:53:25 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2018-10-04 00:01:17 +0000 media-libs/libtheora: Fix undefined behaviour, EAPI-7 bump Thanks-to: <moatu@opentrash.com> Bug: https://bugs.gentoo.org/620800 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Package-Manager: Portage-2.3.50, Repoman-2.3.11 .../files/libtheora-1.0_beta2-flags.patch | 4 +- .../libtheora/files/libtheora-1.1.1-fix-UB.patch | 47 ++++++++++ .../libtheora/files/libtheora-1.1.1-libpng16.patch | 4 +- .../files/libtheora-1.1.1-underlinking.patch | 4 +- media-libs/libtheora/libtheora-1.1.1-r2.ebuild | 99 ++++++++++++++++++++++ 5 files changed, 152 insertions(+), 6 deletions(-)
ia64 stable
x86 stable
ppc/ppc64 stable
hppa stable
Thanks arches and Andreas for solving this issue. Keep up the good work!
amd64 stable
Stable on alpha.
arm stable
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a27f63ff3786a453e980e0ed13d849f6f27e5f2 commit 8a27f63ff3786a453e980e0ed13d849f6f27e5f2 Author: Rolf Eike Beer <eike@sf-mail.de> AuthorDate: 2018-11-26 07:02:03 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-11-26 07:11:53 +0000 media-libs/libtheora: stable 1.1.1-r2 for sparc Closes: https://bugs.gentoo.org/620800 Signed-off-by: Rolf Eike Beer <eike@sf-mail.de> Package-Manager: Portage-2.3.51, Repoman-2.3.11 RepoMan-Options: --include-arches="sparc" Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> media-libs/libtheora/libtheora-1.1.1-r2.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)