From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10209 invoked by alias); 20 Sep 2012 20:54:45 -0000 Received: (qmail 10152 invoked by uid 48); 20 Sep 2012 20:54:22 -0000 From: "law at redhat dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/14602] New: strstr broken on older i686 targets Date: Thu, 20 Sep 2012 20:54: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: law at redhat 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-09/txt/msg00194.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14602 Bug #: 14602 Summary: strstr broken on older i686 targets Product: glibc Version: 2.17 Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: unassigned@sourceware.org ReportedBy: law@redhat.com CC: drepper.fsp@gmail.com Classification: Unclassified Compile and run the following for older i686 machine. It claims to find the needle ", enable_shared, " in the haystack ", enable_static, ". #include #include int main(void) { const char *haystack = ", enable_static, "; const char *needle = ", enable_shared, "; char *result; int retval; result = strstr(haystack, needle); printf("'%s'\n", result); retval = result ? result - haystack : -1; printf("%d\n", retval); return 0; } This bug was introduced by this commit: commit 400726deef57d8da8d6c7cd5c8e7891eaabab041 Author: Maxim Kuvyrkov Date: Mon May 28 22:50:15 2012 -0700 Detect EOL on-the-fly in strstr, strcasestr and memmem. For reference, the cpuflags for a machine which can trigger this failure: flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dts tpr_shadow -- 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.