From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9248 invoked by alias); 10 Jul 2011 10:04:45 -0000 Received: (qmail 9239 invoked by uid 22791); 10 Jul 2011 10:04:44 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_NX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 10 Jul 2011 10:04:31 +0000 From: "xunxun1982 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash. X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: blocker X-Bugzilla-Who: xunxun1982 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 10 Jul 2011 10:04:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00745.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616 PcX changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xunxun1982 at gmail dot com --- Comment #12 from PcX 2011-07-10 10:03:48 UTC --- (In reply to comment #11) > FWIW, using mingw.org's gcc-4.5.2 release, the test passes: > > $ g++ -fopenmp omp_test.c -o omp_test -lpthread > $ ./omp_test.exe > OMP : All looks good > > Relevant installation data: > gcc-core-4.5.2-1-mingw32-bin > gcc-c++-4.5.2-1-mingw32-bin > libgcc-4.5.2-1-mingw32-dll-1 > libstdc++-4.5.2-1-mingw32-dll-6 > libgomp-4.5.2-1-mingw32-dll-1 > mingwrt-3.18-mingw32-dll > mingwrt-3.18-mingw32-dev > w32api-3.17-2-mingw32-dev > pthreads-w32-2.8.0-3-mingw32-dev > libpthread-2.8.0-3-mingw32-dll-2 > > I believe this is because TLS support was added to the mingw(32) runtime in > late Jan 2010, thanks to Kai's work: > http://thread.gmane.org/gmane.comp.gnu.mingw.devel/3550 > > (Although a full compiler suite, and mingw runtime, with TLS support was not > officially released until March 2010) I don't thinks so. Because mingw64 crt also contains TLS support written by Kai, but mingw64 crt also use the code to crash.