Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2016 17:15:34 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-toolchain@FreeBSD.org
Subject:   [Bug 214863] lang/gcc + libc++ may fail due to spurious __cxa_throw_bad_array_new_length reference
Message-ID:  <bug-214863-29464-KTxNr7cVxK@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-214863-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-214863-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214863

Dimitry Andric <dim@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dim@FreeBSD.org

--- Comment #1 from Dimitry Andric <dim@FreeBSD.org> ---
This is because g++ 4.9 is now inserting a call to
__cxa_throw_bad_array_new_length, e.g.:

main:
.LFB0:
        .cfi_startproc
        leal    4(%esp), %ecx
        .cfi_def_cfa 1, 0
        andl    $-16, %esp
        pushl   -4(%ecx)
        pushl   %ebp
        .cfi_escape 0x10,0x5,0x2,0x75,0
        movl    %esp, %ebp
        pushl   %ecx
        .cfi_escape 0xf,0x3,0x75,0x7c,0x6
        subl    $20, %esp
        movl    $5, -12(%ebp)
        movl    -12(%ebp), %eax
        addl    $2, %eax
        cmpl    $532676608, %eax
        ja      .L2
        sall    $2, %eax
        jmp     .L5
.L2:
        call    __cxa_throw_bad_array_new_length

but the support for this call was only merged to stable/10 in r278724, way
after 10.1-R was created.

One option is to compile the program without exception support, or to
explicitly use gcc 4.8 or lower.  I could not find a gcc command line optio=
n to
disable the generation of these calls.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214863-29464-KTxNr7cVxK>