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

gee <jojelino at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|deregister_frame_fn is set  |[META-BUG][target]deregiste
                   |to invalid address in       |r_frame_fn is set to
                   |cygming-crtbegin.c:__gcc_de |invalid address in
                   |register_frame due to       |cygming-crtbegin.c:__gcc_de
                   |unknown reason.             |register_frame due to
                   |                            |unknown reason.

--- Comment #1 from gee <jojelino at gmail dot com> ---
bootstrap failed with faulting libgcc static library.

Dump of assembler code for function __gcc_deregister_frame:
   0x00401160 <+0>:     push   %ebp
   0x00401161 <+1>:     mov    %esp,%ebp
   0x00401163 <+3>:     sub    $0x18,%esp
   0x00401166 <+6>:     movl   $0x475000,(%esp)
   0x0040116d <+13>:    call   *0x5a0480
   0x00401173 <+19>:    mov    $0x46e010,%edx
=> 0x00401178 <+24>:    sub    $0x4,%esp
   0x0040117b <+27>:    test   %eax,%eax
   0x0040117d <+29>:    je     0x401195 <__gcc_deregister_frame+53>
   0x0040117f <+31>:    movl   $0x475047,0x4(%esp)
   0x00401187 <+39>:    mov    %eax,(%esp)
   0x0040118a <+42>:    call   *0x5a0484
   0x00401190 <+48>:    sub    $0x8,%esp
   0x00401193 <+51>:    mov    %eax,%edx
   0x00401195 <+53>:    test   %edx,%edx
   0x00401197 <+55>:    je     0x4011a2 <__gcc_deregister_frame+66>
   0x00401199 <+57>:    movl   $0x591000,(%esp)
   0x004011a0 <+64>:    call   *%edx
   0x004011a2 <+66>:    leave
   0x004011a3 <+67>:    ret
(gdb) i li *0x46e010
Line 185 of "../.././libgcc/unwind-dw2-fde.c"
   starts at address 0x46e00f <__deregister_frame_info_bases+159>
   and ends at 0x46e020 <__deregister_frame_info>.

why cygming-crtbegin.c:154 set invalid function pointer address??? it should be
__deregister_frame_info 
(gdb) x/i __deregister_frame_info
   0x46e020 <__deregister_frame_info>:
    jmp    0x46df70 <__deregister_frame_info_bases>

i think gcc is corrupted in calculating function pointer address.
and the failed bootstrap was using gcc with following version.
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-cygwin/4.9.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: ./configure --config-cache --prefix=/usr
--disable-win32-registry --enable-threads=single
--enable-languages=c,c++,lto,fortran --with-win32-nlsapi=unicode --enable-tls
--disable-bootstrap --enable-shared --disable-sjlj-exceptions --enable-gomp
--enable-cloog-backend=isl LTLDFLAGS=-no-undefined
lt_cv_deplibs_check_method=pass_all : (reconfigured) ./configure --config-cache
--prefix=/usr --disable-win32-registry --enable-threads=win32
--with-win32-nlsapi=unicode --enable-tls --disable-bootstrap --enable-shared
--disable-sjlj-exceptions --enable-gomp --enable-cloog-backend=isl
LTLDFLAGS=-no-undefined lt_cv_deplibs_check_method=pass_all
--enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: single
gcc version 4.9.0 20130516 (experimental) (GCC)

Reply via email to