From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21175 invoked by alias); 25 Jun 2010 05:08:00 -0000 Received: (qmail 21137 invoked by uid 48); 25 Jun 2010 05:07:48 -0000 Date: Fri, 25 Jun 2010 05:08:00 -0000 Subject: [Bug libmudflap/44661] New: Link order (?) might cause threaded libmudflap to assert X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "davi dot arnaut at sun dot com" 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: 2010-06/txt/msg02419.txt.bz2 Tweaking the order of library names might cause the mudflap runtime to assert. $ cat foo.c #include #include #include static void *routine(void* arg) { pthread_t thr = pthread_self(); printf("foo %d\n", 1); return NULL; } int main() { pthread_t thr; pthread_create(&thr, NULL, routine, NULL); pthread_join(thr, NULL); return 0; } $ gcc -o foo foo.c -fmudflapth -lpthread -lmudflapth $ ./foo mf: erroneous reentrancy detected in `__mf_check' Aborted (core dumped) $ gcc -o foo foo.c -fmudflapth -lmudflapth -lpthread $ ./foo foo 1 g++ (Ubuntu 20100621-0ubuntu1) 4.6.0 20100621 (experimental) [trunk revision 161065] GNU gold (GNU Binutils for Ubuntu 2.20.51-system.20100617) 1.9 -- Summary: Link order (?) might cause threaded libmudflap to assert Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libmudflap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davi dot arnaut at sun dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44661