Bug 196715 - elftoolchain strip(1) core dumps a lot when building ports/multimedia/x264 and ports/multimedia/ffmpeg
Summary: elftoolchain strip(1) core dumps a lot when building ports/multimedia/x264 an...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-14 10:48 UTC by Daniel Engberg
Modified: 2015-01-15 19:16 UTC (History)
3 users (show)

See Also:


Attachments
Sample file (8.36 KB, application/x-object)
2015-01-14 14:22 UTC, Daniel Engberg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2015-01-14 10:48:07 UTC
Building x264 with settings ASM, GPAC, PGO enabled cases strip to core dump a lot, this is also seen when building ffmpeg afterwards.

...
YASM  libavcodec/x86/dwt_yasm.o
STRIP libavcodec/x86/dsputilenc.o
STRIP libavcodec/x86/dwt_yasm.o
library.mak:26: recipe for target 'libavcodec/x86/dsputilenc.o' failed
gmake[4]: [libavcodec/x86/dsputilenc.o] Floating point exception (core dumped) (ignored)
CC    libavcodec/x86/fdct.o
CC    libavcodec/x86/fdctdsp_init.o
YASM  libavcodec/x86/fft.o
libavcodec/x86/fft.asm:54: warning: section flags ignored on section redeclaration
STRIP libavcodec/x86/fft.o
library.mak:26: recipe for target 'libavcodec/x86/dwt_yasm.o' failed
gmake[4]: [libavcodec/x86/dwt_yasm.o] Floating point exception (core dumped) (ignored)

and so on....

FreeBSD 11.0-CURRENT #0 r276959, ports about 2 hours old.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2015-01-14 10:51:42 UTC
ffmpeg using "optimized cflags" enable but I don't think it matters...
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2015-01-14 11:03:13 UTC
Per request by koobs@ -DWITH_DEBUG doesn't resolve the issue, it should also be mentioned that libx264 is affected which I guess is provided by the multimedia/x264 port?
Comment 3 Ed Maste freebsd_committer freebsd_triage 2015-01-14 13:58:38 UTC
Would you mind attaching one of the .o files that triggers the crash? e.g. dsputilenc.o
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2015-01-14 14:22:57 UTC
Created attachment 151622 [details]
Sample file
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-01-14 14:50:40 UTC
A commit references this bug:

Author: emaste
Date: Wed Jan 14 14:49:59 UTC 2015
New revision: 277181
URL: https://svnweb.freebsd.org/changeset/base/277181

Log:
  elfcopy: Avoid divide-by-0 on section alignment 0

  According to ELF ABI, alignment 0 and 1 has the same meaning: the
  section has no alignment constraints.

  PR:		196715
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/contrib/elftoolchain/elfcopy/sections.c
Comment 6 Ed Maste freebsd_committer freebsd_triage 2015-01-14 17:40:51 UTC
Thank you for the report; I believe this should now be fixed with r277181.

Please reopen if it still occurs; I will also try to build with these options on my test machine shortly.
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2015-01-15 19:16:00 UTC
Confirmed working on FreeBSD 11.0-CURRENT #0 r277203

Thanks for the quick fix