From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5712 invoked by alias); 26 Apr 2003 18:47:25 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 5691 invoked from network); 26 Apr 2003 18:47:24 -0000 Received: from unknown (HELO mout1.freenet.de) (194.97.50.132) by sources.redhat.com with SMTP; 26 Apr 2003 18:47:24 -0000 Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout1.freenet.de with asmtp (Exim 4.15) id 199Uhn-0004qb-WC for libc-hacker@sources.redhat.com; Sat, 26 Apr 2003 20:47:23 +0200 Received: from b01a1.pppool.de ([213.7.1.161] helo=whitebox.local) by mx2.freenet.de with esmtp (Exim 4.14 #2) id 199Uhn-0003C6-6e for libc-hacker@sources.redhat.com; Sat, 26 Apr 2003 20:47:23 +0200 Received: from whitebox.local (localhost [127.0.0.1]) by whitebox.local (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id h3QIjYPY027069 for ; Sat, 26 Apr 2003 20:45:35 +0200 Received: (from andreas@localhost) by whitebox.local (8.12.7/8.12.7/Submit) id h3QIjYjU027066; Sat, 26 Apr 2003 20:45:34 +0200 X-Authentication-Warning: whitebox.local: andreas set sender to schwab@suse.de using -f To: libc-hacker@sources.redhat.com Subject: Suspect expression in elf/dl-close.c X-Yow: Yow! It's a hole all the way to downtown Burbank! From: Andreas Schwab Date: Sat, 26 Apr 2003 18:47:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00064.txt.bz2 The following line in elf/dl-close.c looks wrong: while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0) I think it should rather be this: while (idx - disp > (disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0)) Andreas. 2003-04-26 Andreas Schwab * elf/dl-close.c (remove_slotinfo): Fix missing parens. --- elf/dl-close.c.~1.96.~ 2003-04-25 14:15:34.000000000 +0200 +++ elf/dl-close.c 2003-04-26 20:14:45.000000000 +0200 @@ -80,7 +80,7 @@ remove_slotinfo (size_t idx, struct dtv_ return true; } - while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0) + while (idx - disp > (disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0)) { --idx;