[Bug c++/53308] New: AIX 5.3 segmentation fault with basic_ofstream, pthread and -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53308 Bug #: 53308 Summary: AIX 5.3 segmentation fault with basic_ofstream, pthread and -O2 Classification: Unclassified Product: gcc Version: 4.4.7 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ask...@appfluent.com Created attachment 27365 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27365 This is the preprocessed file On AIX 5.3, this program has a segmentation fault when built using both pthread and O2. It runs normally when that particular combination is not used. Source file: t.cpp #include int main(int argc, char** argv) { std::basic_ofstream f("a.txt", std::ios::out); return 0; } g++ -v Using built-in specs. Target: powerpc-ibm-aix5.3.0.0 Configured with: /home/askees/gcc/gcc-4.4.7/configure --prefix=/usr/local/gnu/gcc/gcc-4.4.7 --with-gmp=/usr/local/gnu/gmp/gmp-5.0.1 --with-mpfr=/usr/local/gnu/mpfr/mpfr-2.4.2 --enable-threads=posix --enable-languages=c,c++ --with-as=/usr/bin/as --with-ld=/usr/bin/ld --host=powerpc-ibm-aix5.3.0.0 --target=powerpc-ibm-aix5.3.0.0 --build=powerpc-ibm-aix5.3.0.0 Thread model: aix gcc version 4.4.7 (GCC) Compile g++ t.cpp -O2 -L/usr/lib/threads -pthread
[Bug c++/18024] New: IOT/Abort trap (core dumped) on AIX with -pthread
I'm running on a 32-bit AIX 5.1 box. GCC 3.3.5 was configured as follows and bootstrapped. # This directory was configured as follows: /home/downloads/gcc/gcc-3.3.5/configure --with-gcc-version-trigger=/home/downloa ds/gcc/gcc-3.3.5/gcc/version.c --host=powerpc-ibm-aix5.1.0.0 --enable-threads=po six --prefix=/usr/local/gcc/gcc-3.3.5 --enable-languages=c,c++ --norecursion When I compile any program that uses -pthread and also throws exceptions, an "IOT/Abort trap (core dumped)" occurs. To reproduce this bug, use the following program. FILE: main.cpp (begin) int main(int argc, char** argv) { try { throw "bug"; } catch(...) { } return 0; } FILE: main.cpp (end) * When compiled with "g++ main.cpp" the application runs fine. * When compiled with "g++ -pthread main.cpp" the error occurs at runtime. * When compiled with "g++ -lpthread main.cpp" the application runs fine. However, this does not link libgcc_s_pthread which leads to instability in the real threaded application. This bug is similiar to #13391, but 3.3.5 did not contain the patches referenced. -- Summary: IOT/Abort trap (core dumped) on AIX with -pthread Product: gcc Version: 3.3.5 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: askees at appfluent dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18024
[Bug c++/18024] IOT/Abort trap (core dumped) on AIX with -pthread
-- What|Removed |Added GCC host triplet||powerpc-ibm-aix5.1.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18024
[Bug c++/18024] IOT/Abort trap (core dumped) on AIX with -pthread
--- Additional Comments From askees at appfluent dot com 2004-10-16 13:48 --- After many attempts with various configure settings, I was able to get 3.4.2 (with both libstdc++-v3 and libgcc_s_pthread) installed. As in 3.3.5, the problem still exists if both libpthread (in /usr/lib/libpthreads.a) and libgcc_s_pthread are linked. If I explicitly remove libgcc_s_pthread, the core does not occur. However, this library is linked automatically by the -pthread option, so I assume it is important and required. As a side note, I tried the example code in bug #13391 and those test cases are broken as well. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18024
[Bug bootstrap/18033] New: --disable-aix64 doesn't remove ppc64 from multilib list
The --disable-aix64 (--enable-aix64=no) configuration switch claims to remove ppc64 from the multilib list; however, it doesn't seem to work. On a 32-bit AIX system, it must be disabled or the build fails when "checking whether the C compiler works". The larger --disable-multilib switch works, but is not desirable since it disables all other libraries including libgcc_s_pthread. config.status: #! /bin/sh # Generated automatically by configure. # Run this file to recreate the current configuration. # This directory was configured as follows, # on host askees-aix: # # /home/downloads/gcc/gcc-3.4.2/configure --enable-threads=posix --prefix=/usr/ local/gcc/gcc-3.4.2 --enable-languages=c,c++ --enable-aix64=no --with-gcc-versio n-trigger=/home/downloads/gcc/gcc-3.4.2/gcc/version.c Bootstrap failure (you can see it entering ppc64 despite being disable): gmake[2]: Leaving directory `/home/downloads/gcc/gcc-3.4.2.objdir3/powerpc-ibm- aix5.1.0.0/powerpc/libstdc++-v3/include' Running configure in multilib subdir ppc64 pwd: /home/downloads/gcc/gcc-3.4.2.objdir3/powerpc-ibm-aix5.1.0.0 mkdir ppc64 configure: creating cache ./config.cache checking build system type... powerpc-ibm-aix5.1.0.0 checking host system type... powerpc-ibm-aix5.1.0.0 checking target system type... powerpc-ibm-aix5.1.0.0 checking for a BSD-compatible install... /home/downloads/gcc/gcc-3.4.2/install- sh -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether gmake sets $(MAKE)... yes checking for powerpc-ibm-aix5.1.0.0-gcc... /home/downloads/gcc/gcc- 3.4.2.objdir3/gcc/xgcc -B/home/downloads/gcc/gcc-3.4.2.objdir3/gcc/ - B/usr/local/gcc/gcc-3.4.2/powerpc-ibm-aix5.1.0.0/bin/ -B/usr/local/gcc/gcc- 3.4.2/powerpc-ibm-aix5.1.0.0/lib/ -isystem /usr/local/gcc/gcc-3.4.2/powerpc-ibm- aix5.1.0.0/include -isystem /usr/local/gcc/gcc-3.4.2/powerpc-ibm-aix5.1.0.0/sys- include -maix64 checking for C compiler default output... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. gmake[1]: *** [configure-target-libstdc++-v3] Error 1 gmake[1]: Leaving directory `/home/downloads/gcc/gcc-3.4.2.objdir3' gmake: *** [bootstrap] Error 2 -- Summary: --disable-aix64 doesn't remove ppc64 from multilib list Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: askees at appfluent dot com CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc-ibm-aix5.1.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18033
[Bug bootstrap/18033] --disable-aix64 doesn't remove ppc64 from multilib list
-- What|Removed |Added GCC host triplet||powerpc-ibm-aix5.1.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18033
[Bug c++/18649] New: terminate called after throwing - IOT/Abort trap (core dumped)
The threaded program used in this ticket crashes intermittently. The error is sometimes "terminate called after throwing" and something "unwind called recursively". A sample stack trace is shown below. #0 0x in ?? () #1 0xd254ece4 in __gxx_exception_cleanup (code=539406920, exc=0x2026b228) at /home/downloads/gcc/gcc-3.4.2/libstdc++-v3/libsupc++/eh_throw.cc:52 #2 0xd26bdab0 in _Unwind_DeleteException (exc=0x2026b228) at /home/downloads/gcc/gcc-3.4.2/gcc/unwind.inc:277 #3 0xd2548530 in __cxa_end_catch () at /home/downloads/gcc/gcc-3.4.2/libstdc++-v3/libsupc++/eh_catch.cc:119 #4 0x149c in thread_handler () #5 0xd004a410 in _pthread_body () from /usr/lib/libpthreads.a(shr_xpg5.o) #6 0x in ?? () #7 0x in ?? () Previous frame identical to this frame (corrupt stack?) To reproduce the bug, copy this program to "main.cpp" and compile it with "g++ - pthread main.cpp". Then, run the program with "while ./a.out do sleep 1; done". After a minute or so, the program will die. (It doesn't die every time, so that is why you need to run it in the loop.) == #include #include #include #include #define NUM_THREADS 200 #define NUM_LOOPS 1000 pthread_mutexattr_t cs_attr; pthread_mutex_t cs; int cnt; void* thread_handler(void* idptr) { printf("thread_handler (start)\n"); for (int i=0; ihttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=18649
[Bug c++/18649] terminate called after throwing - IOT/Abort trap (core dumped)
--- Additional Comments From askees at appfluent dot com 2004-11-24 21:29 --- I downloaded 3.4.3 and the bug still exists. So, it is not a duplicate of 13391. -- What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|DUPLICATE | Version|3.4.2 |3.4.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18649