From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27119 invoked by alias); 4 Jun 2012 09:50:03 -0000 Received: (qmail 27051 invoked by uid 22791); 4 Jun 2012 09:50:02 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jun 2012 09:49:50 +0000 From: "kari.jyrkinen at gmail dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/14195] New: strncasecmp causes segmentation fault when comparing empty strings Date: Mon, 04 Jun 2012 09:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kari.jyrkinen at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: 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-06/txt/msg00010.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14195 Bug #: 14195 Summary: strncasecmp causes segmentation fault when comparing empty strings Product: glibc Version: 2.15 Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: unassigned@sourceware.org ReportedBy: kari.jyrkinen@gmail.com CC: drepper.fsp@gmail.com Classification: Unclassified Minimal example: #include int main(int argc, const char *argv[]) { char *p = ""; return strncasecmp(p, "", 1); } It seems the return value is corrupted as the compiled program crashes only when it is referenced. Crashes only on 32 bit and certain processors, might bet when SSE3 and SSE4 are in use, as this problem appeared in the newest glibc and there seems to be changes for it done: * Optimized strcasecmp and strncasecmp for SSSE3 and SSE4.2 on x86-32. -- 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.