[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#710845: marked as done (g++-4.6: mipsel executables built -Wl,-z,now -fPIE crash on startup)



Your message dated Sun, 02 Jun 2013 22:13:29 -0400
with message-id <udlk3mcx7p2.fsf@dr-wily.mit.edu>
and subject line Re: Bug#710845: g++-4.6: mipsel executables built -Wl,-z,now -fPIE crash on startup
has caused the Debian Bug report #710845,
regarding g++-4.6: mipsel executables built -Wl,-z,now -fPIE crash on startup
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
710845: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710845
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: g++-4.6
Version: 4.6.4-2
Severity: serious
Justification: makes other packages fail to build from source

On mipsel, C++ executables built with -Wl,-z,now and -fPIE (per dpkg's
customary hardening flags) crash on startup (jumping to NULL from
__libc_start_main@plt), leading to #710807 and likely also #708812.
Could you please take a look?

Thanks!

BTW, the same errors occur with g++-4.7 4.7.3-4 and g++-4.8 4.8.0-8;
please feel free to clone and/or reassign this report accordingly.

----------------------------------------------------------------------

$ cat test.cc
#include <string>

static std::string s;

int main(int, char**) { return 0; }
$ g++ -Wl,-z,now -fPIE test.cc
$ gdb a.out
GNU gdb (GDB) 7.4.1-debian
[...]
Reading symbols from /home/ucko/a.out...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/ucko/a.out 

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0x00400620 in _PROCEDURE_LINKAGE_TABLE_ ()
Backtrace stopped: frame did not save the PC
(gdb) info sym 0x400620
__libc_start_main@plt in section .plt of /home/ucko/a.out
(gdb) break __libc_start_main@plt
Breakpoint 1 at 0x400620
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb) run
Starting program: /home/ucko/a.out 

Breakpoint 1, 0x00400620 in __libc_start_main@plt ()
(gdb) where
#0  0x00400620 in __libc_start_main@plt ()
#1  0x00400678 in _ftext ()
(gdb) disass
Dump of assembler code for function __libc_start_main@plt:
=> 0x00400620 <+0>:     lui     t7,0x41
   0x00400624 <+4>:     lw      t9,2764(t7)
   0x00400628 <+8>:     jr      t9
   0x0040062c <+12>:    addiu   t8,t7,2764
End of assembler dump.

--- End Message ---
--- Begin Message ---
Package: g++-4.6
Version: 4.6.4-2

ucko@debian.org (Aaron M. Ucko) writes:

> Cc:ing debian-mips, then, as this is out of my league.

Never mind, it looks like the error occurs only when using -fPIE without
-pie, as the executable responsible for #710807 accidentally did; that
happened to work up through eglibc 2.13, but broke with 2.17 on mips*.
As I understand it, that's not supported usage at all, so I'm closing
this bug accordingly.  Sorry for the noise.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?amu@monk.mit.edu

--- End Message ---

Reply to: