public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50397] New: openssl crash due to incorrect codegen when using LTO
@ 2011-09-15  0:38 matt at use dot net
  2011-09-15  1:09 ` [Bug middle-end/50397] " matt at use dot net
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: matt at use dot net @ 2011-09-15  0:38 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50397
           Summary: openssl crash due to incorrect codegen when using LTO
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: matt@use.net


When adding -flto and compiling openssl-1.0.0d with gcc-4.6.real (Ubuntu/Linaro
4.6.1-9ubuntu2) that comes with Ubuntu 11.10, the testsuite fails with a
segfault during the bignumber tests. 

To reproduce:
1. untar openssl-1.0.0d
2. make this change in the Configure file on the "debian-amd64" line:
"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O2 -flto -floop-block
-floop-flatten -floop-interchange -floop-strip-mine -Wa,--noexecstack -g -Wall
-DMD32_REG_T=int::-D_REENTRANT::-Wl,-flto=2 -ldl
-Wl,-Bsymbolic-functions:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT
DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::",

3. make, which will run the tests and fail.
4. for extra grins, run the specific suite under valgrind:
matt@matt-desktop:~/openssl-1.0.0d/test$ valgrind -q --trace-children=yes
../util/shlib_wrap.sh ./bntest
[...]
==12136== Process terminating with default action of signal 8 (SIGFPE)
==12136==  Integer divide by zero at address 0x40359EA94
==12136==    at 0x433C4D: BN_div (bn_div.c:342)
==12136==    by 0x403B86: main (bntest.c:1951)
Floating point exception (core dumped)


PS: I filed this as 4.6.2, given the number of patches that Linaro has applied
to this 4.6.1 base version. If that's wrong, let me know.
I tried testing it on trunk, but that gets an ICE during compile (filing a
separate bug).


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

* [Bug middle-end/50397] openssl crash due to incorrect codegen when using LTO
  2011-09-15  0:38 [Bug middle-end/50397] New: openssl crash due to incorrect codegen when using LTO matt at use dot net
@ 2011-09-15  1:09 ` matt at use dot net
  2011-09-16 22:08 ` matt at use dot net
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: matt at use dot net @ 2011-09-15  1:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Matt Hargett <matt at use dot net> 2011-09-15 00:37:43 UTC ---
BTW, worth noting that this also happens with just -O1 as well.


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

* [Bug middle-end/50397] openssl crash due to incorrect codegen when using LTO
  2011-09-15  0:38 [Bug middle-end/50397] New: openssl crash due to incorrect codegen when using LTO matt at use dot net
  2011-09-15  1:09 ` [Bug middle-end/50397] " matt at use dot net
@ 2011-09-16 22:08 ` matt at use dot net
  2012-02-02 20:51 ` pinskia at gcc dot gnu.org
  2013-11-09 23:14 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: matt at use dot net @ 2011-09-16 22:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Matt Hargett <matt at use dot net> 2011-09-16 22:00:25 UTC ---
Verified this also happens on trunk with g++ (Ubuntu/Linaro 20110914-1) 4.7.0
20110914 (experimental) [trunk revision 178863]. Tried it with and without
lto-partition=none.


test BN_lshift1
test BN_lshift (fixed)
test BN_lshift
test BN_rshift1
test BN_rshift
Floating point exception (core dumped)


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

* [Bug middle-end/50397] openssl crash due to incorrect codegen when using LTO
  2011-09-15  0:38 [Bug middle-end/50397] New: openssl crash due to incorrect codegen when using LTO matt at use dot net
  2011-09-15  1:09 ` [Bug middle-end/50397] " matt at use dot net
  2011-09-16 22:08 ` matt at use dot net
@ 2012-02-02 20:51 ` pinskia at gcc dot gnu.org
  2013-11-09 23:14 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-02 20:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-02-02
     Ever Confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-02 20:50:40 UTC ---
We really need a fully self contained testcase.


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

* [Bug middle-end/50397] openssl crash due to incorrect codegen when using LTO
  2011-09-15  0:38 [Bug middle-end/50397] New: openssl crash due to incorrect codegen when using LTO matt at use dot net
                   ` (2 preceding siblings ...)
  2012-02-02 20:51 ` pinskia at gcc dot gnu.org
@ 2013-11-09 23:14 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-09 23:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No feedback in over a year so closing.


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

end of thread, other threads:[~2013-11-09 23:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-15  0:38 [Bug middle-end/50397] New: openssl crash due to incorrect codegen when using LTO matt at use dot net
2011-09-15  1:09 ` [Bug middle-end/50397] " matt at use dot net
2011-09-16 22:08 ` matt at use dot net
2012-02-02 20:51 ` pinskia at gcc dot gnu.org
2013-11-09 23:14 ` 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).