From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20749 invoked by alias); 4 Sep 2012 19:09:54 -0000 Received: (qmail 20487 invoked by uid 22791); 4 Sep 2012 19:09:53 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KAM_STOCKTIP,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Sep 2012 19:09:40 +0000 From: "hjl.tools at gmail dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug dynamic-link/14370] ld.so crashes on mismatched TLS/non-TLS symbols Date: Tue, 04 Sep 2012 19:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC Resolution Summary Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00024.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14370 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |hjl.tools at gmail dot com Resolution|INVALID | Summary|SIGFPE in 'ldd -r' |ld.so crashes on mismatched | |TLS/non-TLS symbols --- Comment #15 from H.J. Lu 2012-09-04 19:09:38 UTC --- I don't think ld.so should crash on bad DSO built with the old/bad glibc/binutils: [hjl@gnu-6 pr14370]$ cat x.c #if 0 #include #else int errno = 3; #endif int bar (void) { errno = 4; return errno; } [hjl@gnu-6 pr14370]$ cat main.c #include #include int main () { void *handle; int (*func)(); handle = dlopen ("./libfoo.so", RTLD_LAZY); if (!handle) { fprintf (stderr, "%s\n", dlerror()); return 1; } func = dlsym (handle, "bar"); if (func == NULL) { fprintf (stderr, "%s\n", dlerror()); return 1; } printf ("errno: %d\n", func ()); dlclose (handle); return 0; } [hjl@gnu-6 pr14370]$ make GLIBC-DIR= run.dynamic gcc -m32 -c -o main.o main.c gcc -m32 -o dynamic main.o -ldl gcc -m32 -c -o x.o x.c ./ld -m elf_i386 -shared -o libfoo.so x.o -lm ./dynamic make: *** [run.dynamic] Segmentation fault [hjl@gnu-6 pr14370]$ -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.