From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9952 invoked from network); 20 Jan 2004 09:24:58 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Jan 2004 09:24:58 -0000 Received: (qmail 2448 invoked by alias); 20 Jan 2004 09:24:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19385 Received: (qmail 2393 invoked from network); 20 Jan 2004 09:24:50 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 20 Jan 2004 09:24:50 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [216.136.173.132] by sunsite.dk (MessageWall 1.0.8) with SMTP; 20 Jan 2004 9:24:50 -0000 Message-ID: <20040120092448.40632.qmail@web12405.mail.yahoo.com> Received: from [66.92.171.57] by web12405.mail.yahoo.com via HTTP; Tue, 20 Jan 2004 01:24:48 PST Date: Tue, 20 Jan 2004 01:24:48 -0800 (PST) From: Bob Schmertz Reply-To: robert.schmertz@terpalum.umd.edu Subject: Change in glibc's strncmp -> segfault? To: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi, I man page for strcmp on my Linux system, and it doesn't say anything about the behavior of strcmp or stsrncmp when null pointers are passed. But sometimes you call add_match_part explicitly with NULL parameters for the first six params. Two of these are immediately passed into a strncmp call. I upgraded my glibc on my Gentoo box in the last day or two to 2.3.2-r9. Unfortunately, I don't know what version I had before. From around that time, I started getting crashes when I would tab-complete a directory name. I made it whole again by changing line 344 in compmatch.c (downloaded v. 4.1.1 today) from if (!strncmp(l, w, wl)) to if (l && !strncmp(l, w, wl)) I suppose it should really be (l && w && !strncmp(...)), on the chance that there is somewhere that you are calling add_match_part with a null w but a non-null l, but this fixed my immediate problem. I have no idea if this solution is "correct", but I hope at least I have pointed out the right problem. ===== Cheers, Bob Schmertz __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus