PPC E500v2 cross-compiler pthread_cancel aborting

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

 



Hi,

I am using gcc as part of Yocto, to create a target filesystem for our development boards and have recently updated from GCC 4.8.2 to GCC 4.9.1.

GCC is being used as a cross-compiler for e500v2. (Freescale MPC8544)

An issue has cropped up where pthread_cancel is now aborting when code is built with GCC 4.9.1, but the same code is fine with GCC 4.8.2. (I believe the problem exists with GCC 4.9.0 as well).

As far as I can tell, both are being configured the same way.

I can reproduce the same problem using the example code from "man pthread_cancel".

I've tried to debug as far as possible and think I've tracked down the problem to _Unwind_SetSpColumn in unwind_dw2.c. (I am very much a user of GCC, rather than understanding how the internals work).

GDB is showing that:

dwarf_reg_size_table[__builtin_dwarf_sp_column()] = 8
sizeof(_Unwind_Ptr) = 4
sizeof(_Unwind_Word) = 4

It seems to be hitting gcc_assert(size == sizeof(_Unwind_Word)).

Comparing the values in dwarf_reg_size_table between 4.8.2 and 4.9.1 I'm seeing two different sets of register sizes.

4.8.2
dwarf_reg_size_table[00:31] = 4
dwarf_reg_size_table[32:63] = 8
dwarf_reg_size_table[64:75] = 4
dwarf_reg_size_table[76:108] = 1
dwarf_reg_size_table[109:144] = 4

4.9.1
dwarf_reg_size_table[00:63] = 8
dwarf_reg_size_table[64:66] = 4
dwarf_reg_size_table[67] = 8
dwarf_reg_size_table[68:75] = 4
dwarf_reg_size_table[76] = 1
dwarf_reg_size_table[77:108] = 16
dwarf_reg_size_table[109:112] = 4
dwarf_reg_size_table[113] = 8
dwarf_reg_size_table[114:144] = 4

GCC 4.9.1
Using built-in specs.
COLLECT_GCC=powerpc-owc_cc-linux-gnuspe-gcc
COLLECT_LTO_WRAPPER=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/libexec/powerpc-owc_cc-linux-gnuspe/gcc/powerpc-owc_cc-linux-gnuspe/4.9.1/lto-wrapper
Target: powerpc-owc_cc-linux-gnuspe
Configured with: /srv/nfs/chris/owc_up_gcc49/poky/build/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/configure --build=x86_64-linux --host=x86_64-linux --target=powerpc-owc_cc-linux-gnuspe --prefix=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr --exec_prefix=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr --bindir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/bin/powerpc-owc_cc-linux-gnuspe --sbindir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/bin/powerpc-owc_cc-linux-gnuspe --libexecdir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/libexec/powerpc-owc_cc-linux-gnuspe --datadir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/share --sysconfdir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/etc --sharedstatedir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/com --localstatedir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sy
sroots/x86_64-linux/var --libdir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/lib/powerpc-owc_cc-linux-gnuspe --includedir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/include --oldincludedir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/include --infodir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/share/info --mandir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux --enable-clocale=generic --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=powerpc-owc_cc-linux-gnuspe- --without-local-prefix --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with
-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --with-gxx-include-dir=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/da923rc/usr/include/c++/4.9.1 --with-sysroot=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/da923rc --with-build-sysroot=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/da923rc --with-long-double-128 --enable-poison-system-directories --with-mpfr=/srv/nfs/chris/owc_up_gcc49/poky/build/tmp/sysroots/x86_64-linux/usr --with-system-zlib --disable-nls
Thread model: posix
gcc version 4.9.1 (GCC)

Looking at the mailing lists and GCC bug database, I cannot seem to be find anything similar. I've also looked at the git logs from 4.8.2->4.9.1 but again nothing jumped out as related.

Thanks for any help.

Chris Carr




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux