public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58056] New: ld segfaults when "-undefined dynamic_lookup" is set
@ 2013-08-02  8:11 freget at googlemail dot com
  2013-08-02  8:45 ` [Bug c++/58056] " paolo.carlini at oracle dot com
  2013-08-02 13:50 ` [Bug other/58056] " pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: freget at googlemail dot com @ 2013-08-02  8:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58056

            Bug ID: 58056
           Summary: ld segfaults when "-undefined dynamic_lookup" is set
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: freget at googlemail dot com

Created attachment 30588
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30588&action=edit
Object file causing the error

I'm using g++ 4.8.1 on OS X with the following configuration:

Ziel: x86_64-apple-darwin12.4.0
Konfiguriert mit: ../configure --build=x86_64-apple-darwin12.4.0
--prefix=/usr/local/Cellar/gcc48/4.8.1/gcc
--datarootdir=/usr/local/Cellar/gcc48/4.8.1/share
--bindir=/usr/local/Cellar/gcc48/4.8.1/bin
--enable-languages=c,c++,fortran,java,objc,obj-c++ --program-suffix=-4.8
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog
--with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes
--enable-stage1-checking --enable-checking=release --enable-lto
--disable-werror --enable-plugin
--with-ecj-jar=/usr/local/opt/ecj/share/java/ecj.jar --disable-multilib
Thread-Modell: posix
gcc-Version 4.8.1 (GCC) 

Using the (faulty) object file attached, the following call causes a segfault: 

> g++-4.8   -std=c++0x -g -dynamiclib  -undefined dynamic_lookup -o output.dylib Notifications.cpp.o 
collect2: Fehler: ld mit Signal 11 [Segmentation fault: 11] beendet

However, once I link without "-undefined dynamic_lookup", I get a meaningful
error description:

> g++-4.8 -std=c++0x -g -dynamiclib   -o output.dylib Notifications.cpp.o 
Undefined symbols for architecture x86_64:
  "libsoda::(anonymous namespace)::CustomOutputBuffer::~CustomOutputBuffer()",
referenced from:
      libsoda::(anonymous namespace)::CustomWarnBuffer::~CustomWarnBuffer() in
Notifications.cpp.o
      libsoda::(anonymous namespace)::CustomErrBuffer::~CustomErrBuffer() in
Notifications.cpp.o
      libsoda::(anonymous namespace)::CustomPrintBuffer::~CustomPrintBuffer()
in Notifications.cpp.o
  "vtable for libsoda::(anonymous namespace)::CustomOutputBuffer", referenced
from:
      libsoda::(anonymous
namespace)::CustomOutputBuffer::CustomOutputBuffer(unsigned long) in
Notifications.cpp.o
  NOTE: a missing vtable usually means the first non-inline virtual member
function has no definition.
  "_elog_finish", referenced from:
      libsoda::(anonymous namespace)::CustomPrintBuffer::printToUser(char*) in
Notifications.cpp.o
      libsoda::(anonymous namespace)::CustomErrBuffer::printToUser(char*) in
Notifications.cpp.o
      libsoda::(anonymous namespace)::CustomWarnBuffer::printToUser(char*) in
Notifications.cpp.o
      libsoda::(anonymous namespace)::DefaultHandler(char const*, char const*,
char const*, int) in Notifications.cpp.o
  "_elog_start", referenced from:
      libsoda::(anonymous namespace)::CustomPrintBuffer::printToUser(char*) in
Notifications.cpp.o
      libsoda::(anonymous namespace)::CustomErrBuffer::printToUser(char*) in
Notifications.cpp.o
      libsoda::(anonymous namespace)::CustomWarnBuffer::printToUser(char*) in
Notifications.cpp.o
      libsoda::(anonymous namespace)::DefaultHandler(char const*, char const*,
char const*, int) in Notifications.cpp.o
ld: symbol(s) not found for architecture x86_64
collect2: Fehler: ld gab 1 als Ende-Status zurück

This is something I can work with. Debugging with the only output beeing a
segfault is not that easy. 
Not that the example above was stripped down as much as possible and will never
compile successfully in this configuration.
>From gcc-bugs-return-427165-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 02 08:25:58 2013
Return-Path: <gcc-bugs-return-427165-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1581 invoked by alias); 2 Aug 2013 08:25:58 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 1464 invoked by uid 48); 2 Aug 2013 08:25:54 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58048] [4.8/4.9 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
Date: Fri, 02 Aug 2013 08:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords: ice-on-valid-code, ra
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58048-4-Hk0k3AyZHb@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58048-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58048-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg00089.txt.bz2
Content-length: 360

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58048

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Marek Polacek from comment #3)
> Note that with -O0:
> d.c: In function ‘div3’:
> d.c:102:3: error: inconsistent operand constraints in an ‘asm’

Just replace 32 with 32.0 as the asm operand.
>From gcc-bugs-return-427166-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 02 08:34:25 2013
Return-Path: <gcc-bugs-return-427166-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14673 invoked by alias); 2 Aug 2013 08:34:25 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 14611 invoked by uid 48); 2 Aug 2013 08:34:23 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58048] [4.8/4.9 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
Date: Fri, 02 Aug 2013 08:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords: ice-on-valid-code, ra
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58048-4-ht6eWvkVkO@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58048-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58048-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg00090.txt.bz2
Content-length: 375

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX048

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Right, thanks, but then the ICE doesn't occur, so this makes it pretty much ICE
on invalid.  Reduced nevertheless...

void
div3 (void)
{
    double tmp1;
    asm volatile ("fscale":"=t" (tmp1):"0" (0), "u" (0));
}

(with sed 's/(0/(0.0/g' the ICE's gone)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/58056] ld segfaults when "-undefined dynamic_lookup" is set
  2013-08-02  8:11 [Bug c++/58056] New: ld segfaults when "-undefined dynamic_lookup" is set freget at googlemail dot com
@ 2013-08-02  8:45 ` paolo.carlini at oracle dot com
  2013-08-02 13:50 ` [Bug other/58056] " pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-08-02  8:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58056

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Thus this is about ld *not* gcc, right?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug other/58056] ld segfaults when "-undefined dynamic_lookup" is set
  2013-08-02  8:11 [Bug c++/58056] New: ld segfaults when "-undefined dynamic_lookup" is set freget at googlemail dot com
  2013-08-02  8:45 ` [Bug c++/58056] " paolo.carlini at oracle dot com
@ 2013-08-02 13:50 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-08-02 13:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58056

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |other

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #1)
> Thus this is about ld *not* gcc, right?

Meaning you should report this to Apple about their ld crashing.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-02 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-02  8:11 [Bug c++/58056] New: ld segfaults when "-undefined dynamic_lookup" is set freget at googlemail dot com
2013-08-02  8:45 ` [Bug c++/58056] " paolo.carlini at oracle dot com
2013-08-02 13:50 ` [Bug other/58056] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).