Bug 22575 - mpd mislinked with --icf=safe
Summary: mpd mislinked with --icf=safe
Status: RESOLVED DUPLICATE of bug 21066
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.30
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-09 07:00 UTC by Markus Trippelsdorf
Modified: 2017-12-09 08:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
--print-icf-sections output (5.36 KB, text/plain)
2017-12-09 07:03 UTC, Markus Trippelsdorf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2017-12-09 07:00:30 UTC
mpd gets "mislinked" with --icf=safe:

 % x86_64-pc-linux-gnu-g++ -pthread -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -march=amdfam10 -O3 -g -fvisibility=hidden -fno-threadsafe-statics -fmerge-all-constants -ffast-math -ftree-vectorize -ffunction-sections -fdata-sections -Wall -Wextra -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wsign-compare -Wl,--no-demangle,--hash-style=gnu,--as-needed,--gc-sections,--icf=safe -Wl,--gc-sections -o src/mpd src/Main.o libmpd.a libdb_plugins.a libstorage.a -lcurl libplaylist_plugins.a -lFLAC -lwrap libdecoder.a libxiph.a -logg -lvorbis -logg -lFLAC -lsndfile -laudiofile -lsidplay2 -lsidutils -lwavpack libffmpeg.a -lavformat -lavcodec -lavutil libinput.a -lcurl libffmpeg.a -lavformat -lavcodec -lavutil -lasound libarchive.a -lbz2 -lzzip -lz liboutput_plugins.a -lwrap -lao -lasound -lshout libtag.a -lid3tag -lz libfilter_plugins.a libpcm.a -lsamplerate libencoder_plugins.a libxiph.a -logg -lmp3lame -lFLAC -lvorbisenc -lvorbis -logg libmixer_plugins.a -lasound libconf.a libbasic.a libevent.a libthread.a libnet.a libfs.a -lz libsystem.a libutil.a libicu.a -licui18n -licuuc -licudata -lm

(start mpd database update)
Thread 6 "mpd" received signal SIGSEGV, Segmentation fault.                              
[Switching to Thread 0x7fffee398700 (LWP 15931)]                                         
uw_frame_state_for (context=context@entry=0x7fffee397640, fs=fs@entry=0x7fffee397730) at /home/markus/gcc/libgcc/unwind-dw2.c:1257                                                 
1257          return MD_FALLBACK_FRAME_STATE_FOR (context, fs);                          
(gdb) bt                                    
#0  uw_frame_state_for (context=context@entry=0x7fffee397640, fs=fs@entry=0x7fffee397730) at /home/markus/gcc/libgcc/unwind-dw2.c:1257                                             
#1  0x00007ffff5949c52 in _Unwind_RaiseException () at /home/markus/gcc/libgcc/unwind.inc:104                                                                                      
#2  0x00007ffff5cd5c82 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/8.0.0/libstdc++.so.6                                                                                
#3  0x0000000000412cd2 in FileInfo::FileInfo (follow_symlinks=62, path=..., this=0x7fffee397980) at ./src/fs/FileInfo.hxx:73                                                       
#4  Stat (follow=62, path=...) at src/storage/plugins/LocalStorage.cxx:77                
#5  LocalDirectoryReader::GetInfo (this=<optimized out>, follow=<optimized out>) at src/storage/plugins/LocalStorage.cxx:179                                                       
#6  0x0000000000000043 in ?? ()             
#7  0x0000000000000043 in ?? ()             
#8  0x0000000000000000 in ?? ()  

Without --icf=safe everything runs fine.
Comment 1 Markus Trippelsdorf 2017-12-09 07:03:50 UTC
Created attachment 10675 [details]
--print-icf-sections output
Comment 2 Markus Trippelsdorf 2017-12-09 08:01:24 UTC
Looks like a dup of PR21066.
Comment 3 Markus Trippelsdorf 2017-12-09 08:02:27 UTC
dup.

*** This bug has been marked as a duplicate of bug 21066 ***