Sourceware Bugzilla – Attachment 6683 Details for
Bug 14716
memmem crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
GDB debug output
memmem.gdb (text/plain), 43.35 KB, created by
Jan Kratochvil
on 2012-10-13 18:47:01 UTC
(
hide
)
Description:
GDB debug output
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2012-10-13 18:47:01 UTC
Size:
43.35 KB
patch
obsolete
>glibc-2.16.90-24.fc19.x86_64 >https://koji.fedoraproject.org/koji/buildinfo?buildID=359617 > >Core was generated by `/unsafe/home/jkratoch/hammock/20121013Build-gdbcvs-rawhide/fedora-rawhide-x86_6'. >Program terminated with signal 11, Segmentation fault. >#0 two_way_short_needle (needle_len=<optimized out>, needle=<optimized out>, haystack_len=<optimized out>, haystack=<optimized out>) at str-two-way.h:309 >309 != (haystack_char = CANON_ELEMENT (*phaystack++))) >(gdb) p/x $pc >$25 = 0x7f998f063510 >(gdb) info line *$pc >Line 309 of "str-two-way.h" starts at address 0x7f998f063510 <memmem+848> and ends at 0x7f998f063517 <memmem+855>. >(gdb) disas 0x7f998f063510,0x7f998f063517 >Dump of assembler code from 0x7f998f063510 to 0x7f998f063517: >=> 0x00007f998f063510 <memmem+848>: movzbl (%rax),%ecx > 0x00007f998f063513 <memmem+851>: add $0x1,%rax >End of assembler dump. >(gdb) p/x $rax >$26 = 0x3dfc000 >(gdb) x/bx $rax >0x3dfc000: Cannot access memory at address 0x3dfc000 >(gdb) up >#1 memmem (haystack_start=<optimized out>, haystack_len=<optimized out>, needle_start=<optimized out>, needle_len=4) at memmem.c:71 >71 return two_way_short_needle (haystack, haystack_len, needle, needle_len); >(gdb) >#2 0x0000000000757c64 in simple_search_memory (ops=0x37a3d20, start_addr=6315765, search_space_len=15899, pattern= > 0x3defdc0 "xV4\022\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223\223×\225\225\061", pattern_len=4, found_addrp=0x7fff65b50f50) > at target.c:2895 >2895 found_ptr = memmem (search_buf, nr_search_bytes, >(gdb) l >2890 while (search_space_len >= pattern_len) >2891 { >2892 gdb_byte *found_ptr; >2893 unsigned nr_search_bytes = min (search_space_len, search_buf_size); >2894 >2895 found_ptr = memmem (search_buf, nr_search_bytes, >2896 pattern, pattern_len); >2897 >2898 if (found_ptr != NULL) >2899 { >(gdb) p/x search_buf >$27 = 0x3df3490 >(gdb) p/x nr_search_bytes >$28 = 0x3e1b >(gdb) p/x search_buf + nr_search_bytes >$29 = 0x3df72ab >(gdb) p/x pattern >$30 = 0x3defdc0 >(gdb) p/x pattern_len >$31 = 0x4 >(gdb) p/x pattern + pattern_len >$32 = 0x3defdc4 >(gdb) x/4bx pattern >0x3defdc0: 0x78 0x56 0x34 0x12 >(gdb) p nr_search_bytes >$33 = 15899 >(gdb) x/15899bx search_buf >0x3df3490: 0x56 0x34 0x12 0x78 0x78 0x78 0x78 0x78 >0x3df3498: 0x78 0x78 0x78 0x78 0x78 0x78 0x78 0x78 >[...] >0x3df72a0: 0x78 0x78 0x78 0x78 0x78 0x78 0x78 0x78 >0x3df72a8: 0x78 0x78 0x78 >(gdb) frame 0 >#0 two_way_short_needle (needle_len=<optimized out>, needle=<optimized out>, haystack_len=<optimized out>, haystack=<optimized out>) at str-two-way.h:309 >309 != (haystack_char = CANON_ELEMENT (*phaystack++))) >(gdb) info frame >Stack level 0, frame at 0x7fffbf4dd1d0: > rip = 0x7f3d3695f510 in two_way_short_needle (str-two-way.h:309); saved rip 0x757c64 > inlined into frame 1 > source language c. > Arglist at unknown address. > Locals at unknown address, Previous frame's sp in rsp >(gdb) p/x $sp >$3 = 0x7fffbf4dd160 >(gdb) up >#1 memmem (haystack_start=<optimized out>, haystack_len=<optimized out>, needle_start=<optimized out>, needle_len=4) at memmem.c:71 >71 return two_way_short_needle (haystack, haystack_len, needle, needle_len); >(gdb) info frame >Stack level 1, frame at 0x7fffbf4dd1d0: > rip = 0x7f3d3695f510 in memmem (memmem.c:71); saved rip 0x757c64 > called by frame at 0x7fffbf4dd260, caller of frame at 0x7fffbf4dd1d0 > source language c. > Arglist at 0x7fffbf4dd158, args: haystack_start=<optimized out>, haystack_len=<optimized out>, needle_start=<optimized out>, needle_len=4 > Locals at 0x7fffbf4dd158, Previous frame's sp is 0x7fffbf4dd1d0 > Saved registers: > rbx at 0x7fffbf4dd198, rbp at 0x7fffbf4dd1a0, r12 at 0x7fffbf4dd1a8, r13 at 0x7fffbf4dd1b0, r14 at 0x7fffbf4dd1b8, r15 at 0x7fffbf4dd1c0, > rip at 0x7fffbf4dd1c8 >(gdb) p/x $sp >$4 = 0x7fffbf4dd160 >(gdb) up >#2 0x0000000000757c64 in simple_search_memory (ops=0x1e24320 <thread_db_ops>, start_addr=6318069, search_space_len=15899, pattern=0x7f3d384b6c54 "xV4\022", > pattern_len=4, found_addrp=0x7fffbf4dd320) at target.c:2895 >2895 found_ptr = memmem (search_buf, nr_search_bytes, >(gdb) p/x $sp >$5 = 0x7fffbf4dd1d0 >(gdb) p 0x7fffbf4dd1d0 - 0x7fffbf4dd160 >$6 = 112 >(gdb) x/112bx 0x7fffbf4dd160 >0x7fffbf4dd160: 0xe0 0xec 0x59 0x04 0x02 0x00 0x00 0x00 >0x7fffbf4dd168: 0x18 0x3e 0x00 0x00 0x00 0x00 0x00 0x00 >0x7fffbf4dd170: 0xa6 0x69 0x5a 0x04 0x00 0x00 0x00 0x00 >0x7fffbf4dd178: 0xfd 0xff 0xff 0xff 0xff 0xff 0xff 0xff >0x7fffbf4dd180: 0x14 0x3e 0x00 0x00 0x00 0x00 0x00 0x00 >0x7fffbf4dd188: 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 >0x7fffbf4dd190: 0xa0 0x69 0x5a 0x04 0x00 0x00 0x00 0x00 >0x7fffbf4dd198: 0x28 0xfa 0x4b 0x38 0x3d 0x7f 0x00 0x00 >0x7fffbf4dd1a0: 0x50 0xd2 0x4d 0xbf 0xff 0x7f 0x00 0x00 >0x7fffbf4dd1a8: 0x40 0x31 0x5a 0x04 0x00 0x00 0x00 0x00 >0x7fffbf4dd1b0: 0x14 0x51 0x4c 0x38 0x3d 0x7f 0x00 0x00 >0x7fffbf4dd1b8: 0x50 0xaa 0x4a 0x38 0x3d 0x7f 0x00 0x00 >0x7fffbf4dd1c0: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 >0x7fffbf4dd1c8: 0x64 0x7c 0x75 0x00 0x00 0x00 0x00 0x00 >(gdb) p memmem >$1 = {void *(const void *, size_t, const void *, size_t)} 0x7f3d3695f1c0 <memmem> >(gdb) p/x 0x7f3d3695f1c0 - 0x00000000000931c0 >$2 = 0x7f3d368cc000 >(gdb) _ >00000000000931c0 <memmem>: >memmem(): >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:43 > if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in > HAYSTACK. */ >void * >memmem (const void *haystack_start, size_t haystack_len, > const void *needle_start, size_t needle_len) >{ > 931c0: 41 57 push %r15 > 931c2: 41 56 push %r14 > 931c4: 49 89 fe mov %rdi,%r14 > 931c7: 41 55 push %r13 > 931c9: 41 54 push %r12 > 931cb: 55 push %rbp > 931cc: 53 push %rbx > 931cd: 48 89 cb mov %rcx,%rbx > 931d0: 48 83 ec 38 sub $0x38,%rsp >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:49 > /* Abstract memory is considered to be an array of 'unsigned char' values, > not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ > const unsigned char *haystack = (const unsigned char *) haystack_start; > const unsigned char *needle = (const unsigned char *) needle_start; > > if (needle_len == 0) > 931d4: 48 85 c9 test %rcx,%rcx > 931d7: 0f 84 b3 02 00 00 je 93490 <memmem+0x2d0> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:56 > the beginning of the string. */ > return (void *) haystack; > > /* Sanity check, otherwise the loop might search through the whole > memory. */ > if (__builtin_expect (haystack_len < needle_len, 0)) > 931dd: 48 39 f1 cmp %rsi,%rcx > 931e0: 49 89 f4 mov %rsi,%r12 > 931e3: 0f 87 1e 02 00 00 ja 93407 <memmem+0x247> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:63 > > /* Use optimizations in memchr when possible, to reduce the search > size of haystack using a linear algorithm with a smaller > coefficient. However, avoid memchr for long needles, since we > can often achieve sublinear performance. */ > if (needle_len < LONG_NEEDLE_THRESHOLD) > 931e9: 48 83 f9 1f cmp $0x1f,%rcx > 931ed: 48 89 d5 mov %rdx,%rbp > 931f0: 0f 87 a2 02 00 00 ja 93498 <memmem+0x2d8> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:65 > { > haystack = memchr (haystack, *needle, haystack_len); > 931f6: 0f b6 32 movzbl (%rdx),%esi > 931f9: 4c 89 e2 mov %r12,%rdx > 931fc: e8 1f 89 ff ff callq 8bb20 <memchr> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:66 > if (!haystack || __builtin_expect (needle_len == 1, 0)) > 93201: 48 85 c0 test %rax,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:65 > size of haystack using a linear algorithm with a smaller > coefficient. However, avoid memchr for long needles, since we > can often achieve sublinear performance. */ > if (needle_len < LONG_NEEDLE_THRESHOLD) > { > haystack = memchr (haystack, *needle, haystack_len); > 93204: 49 89 c5 mov %rax,%r13 >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:66 > if (!haystack || __builtin_expect (needle_len == 1, 0)) > 93207: 0f 84 fd 01 00 00 je 9340a <memmem+0x24a> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:66 (discriminator 1) > 9320d: 48 83 fb 01 cmp $0x1,%rbx > 93211: 0f 84 f3 01 00 00 je 9340a <memmem+0x24a> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:68 > return (void *) haystack; > haystack_len -= haystack - (const unsigned char *) haystack_start; > 93217: 49 29 c6 sub %rax,%r14 > 9321a: 4b 8d 0c 26 lea (%r14,%r12,1),%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:69 > if (haystack_len < needle_len) > 9321e: 48 39 cb cmp %rcx,%rbx > 93221: 0f 87 e0 01 00 00 ja 93407 <memmem+0x247> > 93227: 41 be 01 00 00 00 mov $0x1,%r14d > 9322d: ba 01 00 00 00 mov $0x1,%edx > 93232: 31 f6 xor %esi,%esi > 93234: 49 c7 c4 ff ff ff ff mov $0xffffffffffffffff,%r12 > 9323b: 49 89 c8 mov %rcx,%r8 > 9323e: 66 90 xchg %ax,%ax >critical_factorization(): >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:137 > > /* Perform lexicographic search. */ > max_suffix = SIZE_MAX; > j = 0; > k = p = 1; > while (j + k < needle_len) > 93240: 48 8d 04 16 lea (%rsi,%rdx,1),%rax > 93244: 48 39 c3 cmp %rax,%rbx > 93247: 76 2a jbe 93273 <memmem+0xb3> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:140 > { > a = CANON_ELEMENT (needle[j + k]); > b = CANON_ELEMENT (needle[max_suffix + k]); > 93249: 4a 8d 7c 25 00 lea 0x0(%rbp,%r12,1),%rdi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:141 > if (a < b) > 9324e: 0f b6 0c 17 movzbl (%rdi,%rdx,1),%ecx > 93252: 38 4c 05 00 cmp %cl,0x0(%rbp,%rax,1) > 93256: 0f 83 e4 01 00 00 jae 93440 <memmem+0x280> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:146 > { > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > p = j - max_suffix; > 9325c: 48 89 c6 mov %rax,%rsi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:145 > b = CANON_ELEMENT (needle[max_suffix + k]); > if (a < b) > { > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > 9325f: ba 01 00 00 00 mov $0x1,%edx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:146 > p = j - max_suffix; > 93264: 49 89 c6 mov %rax,%r14 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:137 > > /* Perform lexicographic search. */ > max_suffix = SIZE_MAX; > j = 0; > k = p = 1; > while (j + k < needle_len) > 93267: 48 8d 04 16 lea (%rsi,%rdx,1),%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:146 > if (a < b) > { > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > p = j - max_suffix; > 9326b: 4d 29 e6 sub %r12,%r14 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:137 > > /* Perform lexicographic search. */ > max_suffix = SIZE_MAX; > j = 0; > k = p = 1; > while (j + k < needle_len) > 9326e: 48 39 c3 cmp %rax,%rbx > 93271: 77 d6 ja 93249 <memmem+0x89> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:171 > *period = p; > > /* Perform reverse lexicographic search. */ > max_suffix_rev = SIZE_MAX; > j = 0; > k = p = 1; > 93273: 41 b9 01 00 00 00 mov $0x1,%r9d > 93279: ba 01 00 00 00 mov $0x1,%edx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:170 > } > *period = p; > > /* Perform reverse lexicographic search. */ > max_suffix_rev = SIZE_MAX; > j = 0; > 9327e: 31 f6 xor %esi,%esi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:169 > } > } > *period = p; > > /* Perform reverse lexicographic search. */ > max_suffix_rev = SIZE_MAX; > 93280: 48 c7 c7 ff ff ff ff mov $0xffffffffffffffff,%rdi > 93287: 4d 89 c2 mov %r8,%r10 > 9328a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:172 > j = 0; > k = p = 1; > while (j + k < needle_len) > 93290: 48 8d 04 16 lea (%rsi,%rdx,1),%rax > 93294: 48 39 c3 cmp %rax,%rbx > 93297: 76 2b jbe 932c4 <memmem+0x104> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:175 > { > a = CANON_ELEMENT (needle[j + k]); > b = CANON_ELEMENT (needle[max_suffix_rev + k]); > 93299: 4c 8d 44 3d 00 lea 0x0(%rbp,%rdi,1),%r8 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:176 > if (b < a) > 9329e: 41 0f b6 0c 10 movzbl (%r8,%rdx,1),%ecx > 932a3: 38 4c 05 00 cmp %cl,0x0(%rbp,%rax,1) > 932a7: 0f 86 73 01 00 00 jbe 93420 <memmem+0x260> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:181 > { > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > p = j - max_suffix_rev; > 932ad: 48 89 c6 mov %rax,%rsi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:180 > b = CANON_ELEMENT (needle[max_suffix_rev + k]); > if (b < a) > { > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > 932b0: ba 01 00 00 00 mov $0x1,%edx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:181 > p = j - max_suffix_rev; > 932b5: 49 89 c1 mov %rax,%r9 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:172 > > /* Perform reverse lexicographic search. */ > max_suffix_rev = SIZE_MAX; > j = 0; > k = p = 1; > while (j + k < needle_len) > 932b8: 48 8d 04 16 lea (%rsi,%rdx,1),%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:181 > if (b < a) > { > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > p = j - max_suffix_rev; > 932bc: 49 29 f9 sub %rdi,%r9 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:172 > > /* Perform reverse lexicographic search. */ > max_suffix_rev = SIZE_MAX; > j = 0; > k = p = 1; > while (j + k < needle_len) > 932bf: 48 39 c3 cmp %rax,%rbx > 932c2: 77 d5 ja 93299 <memmem+0xd9> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:204 > } > } > > /* Choose the longer suffix. Return the first byte of the right > half, rather than the last byte of the left half. */ > if (max_suffix_rev + 1 < max_suffix + 1) > 932c4: 48 83 c7 01 add $0x1,%rdi > 932c8: 49 83 c4 01 add $0x1,%r12 > 932cc: 4c 89 d1 mov %r10,%rcx > 932cf: 4c 39 e7 cmp %r12,%rdi > 932d2: 72 06 jb 932da <memmem+0x11a> > 932d4: 4d 89 ce mov %r9,%r14 > 932d7: 49 89 fc mov %rdi,%r12 >two_way_short_needle(): >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:236 > periodic (with a period as large as NEEDLE_LEN - suffix). */ > suffix = critical_factorization (needle, needle_len, &period); > > /* Perform the search. Each iteration compares the right half > first. */ > if (CMP_FUNC (needle, needle + period, suffix) == 0) > 932da: 4a 8d 74 35 00 lea 0x0(%rbp,%r14,1),%rsi > 932df: 4c 89 e2 mov %r12,%rdx > 932e2: 48 89 ef mov %rbp,%rdi > 932e5: 48 89 4c 24 08 mov %rcx,0x8(%rsp) > 932ea: e8 c1 8b ff ff callq 8beb0 <__GI_memcmp> > 932ef: 85 c0 test %eax,%eax > 932f1: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx > 932f6: 0f 85 af 01 00 00 jne 934ab <memmem+0x2eb> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:258 > == CANON_ELEMENT (*phaystack++))) > ++i; > if (needle_len <= i) > { > /* Scan for matches in left half. */ > i = suffix - 1; > 932fc: 4d 8d 5c 24 ff lea -0x1(%r12),%r11 >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > >/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK > if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in > HAYSTACK. */ >void * >memmem (const void *haystack_start, size_t haystack_len, > 93301: 4c 89 e2 mov %r12,%rdx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:273 > j += period; > memory = needle_len - period; > } > else > { > j += i - suffix + 1; > 93304: 48 c7 44 24 10 01 00 movq $0x1,0x10(%rsp) > 9330b: 00 00 > 9330d: 4c 29 64 24 10 sub %r12,0x10(%rsp) >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 93312: 48 f7 da neg %rdx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:269 > if (i + 1 < memory + 1) > return (RETURN_TYPE) (haystack + j); > /* No match, so remember how many repetitions of period > on the right half were scanned. */ > j += period; > memory = needle_len - period; > 93315: 48 89 d8 mov %rbx,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:259 > ++i; > if (needle_len <= i) > { > /* Scan for matches in left half. */ > i = suffix - 1; > pneedle = &needle[i]; > 93318: 4e 8d 7c 1d 00 lea 0x0(%rbp,%r11,1),%r15 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:269 > if (i + 1 < memory + 1) > return (RETURN_TYPE) (haystack + j); > /* No match, so remember how many repetitions of period > on the right half were scanned. */ > j += period; > memory = needle_len - period; > 9331d: 4c 29 f0 sub %r14,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 93320: 49 89 d1 mov %rdx,%r9 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:243 > /* Entire needle is periodic; a mismatch can only advance by the > period, so use memory to avoid rescanning known occurrences > of the period. */ > size_t memory = 0; > j = 0; > while (AVAILABLE (haystack, haystack_len, j, needle_len)) > 93323: 48 89 cf mov %rcx,%rdi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:236 > periodic (with a period as large as NEEDLE_LEN - suffix). */ > suffix = critical_factorization (needle, needle_len, &period); > > /* Perform the search. Each iteration compares the right half > first. */ > if (CMP_FUNC (needle, needle + period, suffix) == 0) > 93326: 45 31 d2 xor %r10d,%r10d > 93329: 45 31 c0 xor %r8d,%r8d >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:269 > if (i + 1 < memory + 1) > return (RETURN_TYPE) (haystack + j); > /* No match, so remember how many repetitions of period > on the right half were scanned. */ > j += period; > memory = needle_len - period; > 9332c: 48 89 44 24 20 mov %rax,0x20(%rsp) >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 93331: 4d 01 f9 add %r15,%r9 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:243 > /* Entire needle is periodic; a mismatch can only advance by the > period, so use memory to avoid rescanning known occurrences > of the period. */ > size_t memory = 0; > j = 0; > while (AVAILABLE (haystack, haystack_len, j, needle_len)) > 93334: 48 29 df sub %rbx,%rdi >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 93337: 48 89 54 24 18 mov %rdx,0x18(%rsp) > 9333c: 0f 1f 40 00 nopl 0x0(%rax) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:249 > { > const unsigned char *pneedle; > const unsigned char *phaystack; > > /* Scan for matches in right half. */ > i = MAX (suffix, memory); > 93340: 4d 39 e0 cmp %r12,%r8 > 93343: 4c 89 e0 mov %r12,%rax > 93346: 49 0f 43 c0 cmovae %r8,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:251 > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > 9334a: 4a 8d 0c 10 lea (%rax,%r10,1),%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:250 > const unsigned char *pneedle; > const unsigned char *phaystack; > > /* Scan for matches in right half. */ > i = MAX (suffix, memory); > pneedle = &needle[i]; > 9334e: 48 8d 54 05 00 lea 0x0(%rbp,%rax,1),%rdx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:251 > phaystack = &haystack[i + j]; > 93353: 4c 01 e9 add %r13,%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:252 > while (i < needle_len && (CANON_ELEMENT (*pneedle++) > 93356: 48 39 c3 cmp %rax,%rbx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:251 > const unsigned char *phaystack; > > /* Scan for matches in right half. */ > i = MAX (suffix, memory); > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > 93359: 48 89 4c 24 28 mov %rcx,0x28(%rsp) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:252 > while (i < needle_len && (CANON_ELEMENT (*pneedle++) > 9335e: 76 41 jbe 933a1 <memmem+0x1e1> > 93360: 0f b6 09 movzbl (%rcx),%ecx > 93363: 38 0a cmp %cl,(%rdx) > 93365: 0f 85 48 02 00 00 jne 935b3 <memmem+0x3f3> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 9336b: 48 8b 4c 24 28 mov 0x28(%rsp),%rcx > 93370: 48 89 c6 mov %rax,%rsi > 93373: 48 f7 de neg %rsi > 93376: 48 01 f2 add %rsi,%rdx > 93379: 48 01 f1 add %rsi,%rcx > 9337c: 48 89 de mov %rbx,%rsi > 9337f: eb 14 jmp 93395 <memmem+0x1d5> > 93381: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:252 > 93388: 0f b6 1c 01 movzbl (%rcx,%rax,1),%ebx > 9338c: 38 1c 02 cmp %bl,(%rdx,%rax,1) > 9338f: 0f 85 1b 02 00 00 jne 935b0 <memmem+0x3f0> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:254 > == CANON_ELEMENT (*phaystack++))) > ++i; > 93395: 48 83 c0 01 add $0x1,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:252 > > /* Scan for matches in right half. */ > i = MAX (suffix, memory); > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > while (i < needle_len && (CANON_ELEMENT (*pneedle++) > 93399: 48 39 c6 cmp %rax,%rsi > 9339c: 77 ea ja 93388 <memmem+0x1c8> > 9339e: 48 89 f3 mov %rsi,%rbx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:260 > if (needle_len <= i) > { > /* Scan for matches in left half. */ > i = suffix - 1; > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > 933a1: 4b 8d 0c 1a lea (%r10,%r11,1),%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:258 > == CANON_ELEMENT (*phaystack++))) > ++i; > if (needle_len <= i) > { > /* Scan for matches in left half. */ > i = suffix - 1; > 933a5: 4c 89 d8 mov %r11,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:260 > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > 933a8: 4c 01 e9 add %r13,%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:261 > while (memory < i + 1 && (CANON_ELEMENT (*pneedle--) > 933ab: 4d 39 c4 cmp %r8,%r12 > 933ae: 0f 86 5e 02 00 00 jbe 93612 <memmem+0x452> > 933b4: 0f b6 11 movzbl (%rcx),%edx > 933b7: 41 38 17 cmp %dl,(%r15) > 933ba: 0f 85 52 02 00 00 jne 93612 <memmem+0x452> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 933c0: 48 03 4c 24 18 add 0x18(%rsp),%rcx > 933c5: 48 89 de mov %rbx,%rsi > 933c8: eb 17 jmp 933e1 <memmem+0x221> > 933ca: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:261 > 933d0: 0f b6 1c 01 movzbl (%rcx,%rax,1),%ebx > 933d4: 48 8d 50 ff lea -0x1(%rax),%rdx > 933d8: 41 38 1c 01 cmp %bl,(%r9,%rax,1) > 933dc: 75 08 jne 933e6 <memmem+0x226> > 933de: 48 89 d0 mov %rdx,%rax > 933e1: 4c 39 c0 cmp %r8,%rax > 933e4: 75 ea jne 933d0 <memmem+0x210> > 933e6: 48 89 f3 mov %rsi,%rbx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:264 > == CANON_ELEMENT (*phaystack--))) > --i; > if (i + 1 < memory + 1) > 933e9: 49 83 c0 01 add $0x1,%r8 > 933ed: 4c 39 c0 cmp %r8,%rax > 933f0: 0f 82 24 02 00 00 jb 9361a <memmem+0x45a> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:269 > return (RETURN_TYPE) (haystack + j); > /* No match, so remember how many repetitions of period > on the right half were scanned. */ > j += period; > memory = needle_len - period; > 933f6: 4c 8b 44 24 20 mov 0x20(%rsp),%r8 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:268 > --i; > if (i + 1 < memory + 1) > return (RETURN_TYPE) (haystack + j); > /* No match, so remember how many repetitions of period > on the right half were scanned. */ > j += period; > 933fb: 4d 01 f2 add %r14,%r10 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:243 > /* Entire needle is periodic; a mismatch can only advance by the > period, so use memory to avoid rescanning known occurrences > of the period. */ > size_t memory = 0; > j = 0; > while (AVAILABLE (haystack, haystack_len, j, needle_len)) > 933fe: 4c 39 d7 cmp %r10,%rdi > 93401: 0f 83 39 ff ff ff jae 93340 <memmem+0x180> >memmem(): >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:57 > return (void *) haystack; > > /* Sanity check, otherwise the loop might search through the whole > memory. */ > if (__builtin_expect (haystack_len < needle_len, 0)) > return NULL; > 93407: 45 31 ed xor %r13d,%r13d >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:75 > return NULL; > return two_way_short_needle (haystack, haystack_len, needle, needle_len); > } > else > return two_way_long_needle (haystack, haystack_len, needle, needle_len); >} > 9340a: 48 83 c4 38 add $0x38,%rsp > 9340e: 4c 89 e8 mov %r13,%rax > 93411: 5b pop %rbx > 93412: 5d pop %rbp > 93413: 41 5c pop %r12 > 93415: 41 5d pop %r13 > 93417: 41 5e pop %r14 > 93419: 41 5f pop %r15 > 9341b: c3 retq > 9341c: 0f 1f 40 00 nopl 0x0(%rax) >two_way_short_needle(): >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:183 > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > p = j - max_suffix_rev; > } > else if (a == b) > 93420: 74 3e je 93460 <memmem+0x2a0> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:197 > } > } > else /* a < b */ > { > /* Suffix is larger, start over from current location. */ > max_suffix_rev = j++; > 93422: 48 89 f7 mov %rsi,%rdi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:198 > k = p = 1; > 93425: 41 b9 01 00 00 00 mov $0x1,%r9d >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:197 > } > } > else /* a < b */ > { > /* Suffix is larger, start over from current location. */ > max_suffix_rev = j++; > 9342b: 48 83 c6 01 add $0x1,%rsi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:198 > k = p = 1; > 9342f: ba 01 00 00 00 mov $0x1,%edx > 93434: e9 57 fe ff ff jmpq 93290 <memmem+0xd0> > 93439: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:148 > /* Suffix is smaller, period is entire prefix so far. */ > j += k; > k = 1; > p = j - max_suffix; > } > else if (a == b) > 93440: 74 36 je 93478 <memmem+0x2b8> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:162 > } > } > else /* b < a */ > { > /* Suffix is larger, start over from current location. */ > max_suffix = j++; > 93442: 49 89 f4 mov %rsi,%r12 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:163 > k = p = 1; > 93445: 41 be 01 00 00 00 mov $0x1,%r14d >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:162 > } > } > else /* b < a */ > { > /* Suffix is larger, start over from current location. */ > max_suffix = j++; > 9344b: 48 83 c6 01 add $0x1,%rsi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:163 > k = p = 1; > 9344f: ba 01 00 00 00 mov $0x1,%edx > 93454: e9 e7 fd ff ff jmpq 93240 <memmem+0x80> > 93459: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:186 > p = j - max_suffix_rev; > } > else if (a == b) > { > /* Advance through repetition of the current period. */ > if (k != p) > 93460: 4c 39 ca cmp %r9,%rdx > 93463: 0f 84 99 01 00 00 je 93602 <memmem+0x442> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:187 > ++k; > 93469: 48 83 c2 01 add $0x1,%rdx > 9346d: e9 1e fe ff ff jmpq 93290 <memmem+0xd0> > 93472: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:151 > p = j - max_suffix; > } > else if (a == b) > { > /* Advance through repetition of the current period. */ > if (k != p) > 93478: 4c 39 f2 cmp %r14,%rdx > 9347b: 0f 84 71 01 00 00 je 935f2 <memmem+0x432> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:152 > ++k; > 93481: 48 83 c2 01 add $0x1,%rdx > 93485: e9 b6 fd ff ff jmpq 93240 <memmem+0x80> > 9348a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) >memmem(): >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:52 > const unsigned char *needle = (const unsigned char *) needle_start; > > if (needle_len == 0) > /* The first occurrence of the empty string is deemed to occur at > the beginning of the string. */ > return (void *) haystack; > 93490: 49 89 fd mov %rdi,%r13 > 93493: e9 72 ff ff ff jmpq 9340a <memmem+0x24a> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:75 > return NULL; > return two_way_short_needle (haystack, haystack_len, needle, needle_len); > } > else > return two_way_long_needle (haystack, haystack_len, needle, needle_len); >} > 93498: 48 83 c4 38 add $0x38,%rsp > 9349c: 5b pop %rbx > 9349d: 5d pop %rbp > 9349e: 41 5c pop %r12 > 934a0: 41 5d pop %r13 > 934a2: 41 5e pop %r14 > 934a4: 41 5f pop %r15 >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:74 > if (haystack_len < needle_len) > return NULL; > return two_way_short_needle (haystack, haystack_len, needle, needle_len); > } > else > return two_way_long_needle (haystack, haystack_len, needle, needle_len); > 934a6: e9 b5 f8 ff ff jmpq 92d60 <two_way_long_needle> >two_way_short_needle(): >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:280 > } > } > } > else > { > const unsigned char *phaystack = &haystack[suffix]; > 934ab: 4b 8d 44 25 00 lea 0x0(%r13,%r12,1),%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:325 > loop. */ > j = phaystack - &haystack[suffix] - 1; >#endif > > /* Scan for matches in right half. */ > i = suffix + 1; > 934b0: 4d 8d 54 24 01 lea 0x1(%r12),%r10 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:340 > ++i; > } > if (needle_len <= i) > { > /* Scan for matches in left half. */ > i = suffix - 1; > 934b5: 4d 8d 5c 24 ff lea -0x1(%r12),%r11 >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > >/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK > if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in > HAYSTACK. */ >void * >memmem (const void *haystack_start, size_t haystack_len, > 934ba: 4c 89 e2 mov %r12,%rdx > 934bd: bf 01 00 00 00 mov $0x1,%edi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:283 > else > { > const unsigned char *phaystack = &haystack[suffix]; > /* The comparison always starts from needle[suffix], so cache it > and use an optimized first-character loop. */ > unsigned char needle_suffix = CANON_ELEMENT (needle[suffix]); > 934c2: 46 0f b6 4c 25 00 movzbl 0x0(%rbp,%r12,1),%r9d >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:280 > } > } > } > else > { > const unsigned char *phaystack = &haystack[suffix]; > 934c8: 48 89 44 24 10 mov %rax,0x10(%rsp) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:295 > return NULL; >#endif > > /* The two halves of needle are distinct; no extra memory is > required, and any mismatch results in a maximal shift. */ > period = MAX (suffix, needle_len - suffix) + 1; > 934cd: 48 89 d8 mov %rbx,%rax > 934d0: 4e 8d 74 15 00 lea 0x0(%rbp,%r10,1),%r14 > 934d5: 4c 29 e0 sub %r12,%rax > 934d8: 4c 39 e0 cmp %r12,%rax > 934db: 49 0f 42 c4 cmovb %r12,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 934df: 48 f7 da neg %rdx > 934e2: 48 29 d9 sub %rbx,%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:295 > 934e5: 48 83 c0 01 add $0x1,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 934e9: 48 89 54 24 18 mov %rdx,0x18(%rsp) > 934ee: 48 89 4c 24 20 mov %rcx,0x20(%rsp) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:295 > 934f3: 48 89 44 24 28 mov %rax,0x28(%rsp) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:280 > } > } > } > else > { > const unsigned char *phaystack = &haystack[suffix]; > 934f8: 48 8b 44 24 10 mov 0x10(%rsp),%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:341 > } > if (needle_len <= i) > { > /* Scan for matches in left half. */ > i = suffix - 1; > pneedle = &needle[i]; > 934fd: 4c 01 dd add %r11,%rbp >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 93500: 4c 29 e7 sub %r12,%rdi > 93503: 4c 01 f2 add %r14,%rdx > 93506: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) > 9350d: 00 00 00 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:309 > const unsigned char *pneedle; > > /* TODO: The first-character loop can be sped up by adapting > longword-at-a-time implementation of memchr/strchr. */ > if (needle_suffix > != (haystack_char = CANON_ELEMENT (*phaystack++))) > 93510: 0f b6 08 movzbl (%rax),%ecx > ******************************************************* crash > 93513: 48 83 c0 01 add $0x1,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:308 > unsigned char haystack_char; > const unsigned char *pneedle; > > /* TODO: The first-character loop can be sped up by adapting > longword-at-a-time implementation of memchr/strchr. */ > if (needle_suffix > 93517: 41 38 c9 cmp %cl,%r9b > 9351a: 75 f4 jne 93510 <memmem+0x350> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:321 > } > >#if !CHECK_EOL > /* Calculate J if it wasn't kept up-to-date in the first-character > loop. */ > j = phaystack - &haystack[suffix] - 1; > 9351c: 49 89 c7 mov %rax,%r15 > 9351f: 4c 2b 7c 24 10 sub 0x10(%rsp),%r15 > 93524: 49 83 ef 01 sub $0x1,%r15 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:327 >#endif > > /* Scan for matches in right half. */ > i = suffix + 1; > pneedle = &needle[i]; > while (i < needle_len) > 93528: 4c 39 d3 cmp %r10,%rbx > 9352b: 76 3a jbe 93567 <memmem+0x3a7> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:329 > { > if (CANON_ELEMENT (*pneedle++) > 9352d: 0f b6 08 movzbl (%rax),%ecx > 93530: 41 38 0e cmp %cl,(%r14) > 93533: 4c 89 d1 mov %r10,%rcx > 93536: 0f 85 8f 00 00 00 jne 935cb <memmem+0x40b> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 9353c: 48 03 44 24 18 add 0x18(%rsp),%rax > 93541: 48 89 de mov %rbx,%rsi > 93544: eb 15 jmp 9355b <memmem+0x39b> > 93546: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) > 9354d: 00 00 00 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:329 > 93550: 0f b6 5c 01 ff movzbl -0x1(%rcx,%rax,1),%ebx > 93555: 38 5c 11 ff cmp %bl,-0x1(%rcx,%rdx,1) > 93559: 75 6d jne 935c8 <memmem+0x408> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:335 > != (haystack_char = CANON_ELEMENT (*phaystack++))) > { > RET0_IF_0 (haystack_char); > break; > } > ++i; > 9355b: 48 83 c1 01 add $0x1,%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:327 >#endif > > /* Scan for matches in right half. */ > i = suffix + 1; > pneedle = &needle[i]; > while (i < needle_len) > 9355f: 48 39 ce cmp %rcx,%rsi > 93562: 77 ec ja 93550 <memmem+0x390> > 93564: 48 89 f3 mov %rsi,%rbx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:342 > if (needle_len <= i) > { > /* Scan for matches in left half. */ > i = suffix - 1; > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > 93567: 4f 8d 04 1f lea (%r15,%r11,1),%r8 > 9356b: 4d 01 e8 add %r13,%r8 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:343 > while (i != SIZE_MAX) > 9356e: 49 83 fb ff cmp $0xffffffffffffffff,%r11 > 93572: 74 2d je 935a1 <memmem+0x3e1> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:345 > { > if (CANON_ELEMENT (*pneedle--) > 93574: 41 0f b6 00 movzbl (%r8),%eax > 93578: 38 45 00 cmp %al,0x0(%rbp) > 9357b: 75 6b jne 935e8 <memmem+0x428> >/usr/src/debug/glibc-2.16.90-54a41734/string/memmem.c:41 > 9357d: 31 c0 xor %eax,%eax > 9357f: eb 1b jmp 9359c <memmem+0x3dc> > 93581: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:345 > 93588: 0f b6 74 05 ff movzbl -0x1(%rbp,%rax,1),%esi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:346 > != (haystack_char = CANON_ELEMENT (*phaystack--))) > 9358d: 41 0f b6 4c 00 ff movzbl -0x1(%r8,%rax,1),%ecx > 93593: 48 83 e8 01 sub $0x1,%rax >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:345 > i = suffix - 1; > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > while (i != SIZE_MAX) > { > if (CANON_ELEMENT (*pneedle--) > 93597: 40 38 ce cmp %cl,%sil > 9359a: 75 4c jne 935e8 <memmem+0x428> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:343 > { > /* Scan for matches in left half. */ > i = suffix - 1; > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > while (i != SIZE_MAX) > 9359c: 48 39 f8 cmp %rdi,%rax > 9359f: 75 e7 jne 93588 <memmem+0x3c8> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:354 > break; > } > --i; > } > if (i == SIZE_MAX) > return (RETURN_TYPE) (haystack + j); > 935a1: 4d 01 fd add %r15,%r13 > 935a4: e9 61 fe ff ff jmpq 9340a <memmem+0x24a> > 935a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) > 935b0: 48 89 f3 mov %rsi,%rbx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:273 > j += period; > memory = needle_len - period; > } > else > { > j += i - suffix + 1; > 935b3: 4c 03 54 24 10 add 0x10(%rsp),%r10 >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:274 > memory = 0; > 935b8: 45 31 c0 xor %r8d,%r8d >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:273 > j += period; > memory = needle_len - period; > } > else > { > j += i - suffix + 1; > 935bb: 49 01 c2 add %rax,%r10 > 935be: e9 3b fe ff ff jmpq 933fe <memmem+0x23e> > 935c3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) > 935c8: 48 89 f3 mov %rsi,%rbx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:358 > if (i == SIZE_MAX) > return (RETURN_TYPE) (haystack + j); > j += period; > } > else > j += i - suffix + 1; > 935cb: 49 01 ff add %rdi,%r15 > 935ce: 4c 01 f9 add %r15,%rcx >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:365 >#if CHECK_EOL > if (!AVAILABLE (haystack, haystack_len, j, needle_len)) > break; >#endif > > phaystack = &haystack[suffix + j]; > 935d1: 4a 8d 04 21 lea (%rcx,%r12,1),%rax > 935d5: 4c 01 e8 add %r13,%rax > 935d8: 48 3b 4c 24 20 cmp 0x20(%rsp),%rcx > 935dd: 0f 86 2d ff ff ff jbe 93510 <memmem+0x350> > 935e3: e9 1f fe ff ff jmpq 93407 <memmem+0x247> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:355 > } > --i; > } > if (i == SIZE_MAX) > return (RETURN_TYPE) (haystack + j); > j += period; > 935e8: 48 8b 4c 24 28 mov 0x28(%rsp),%rcx > 935ed: 4c 01 f9 add %r15,%rcx > 935f0: eb df jmp 935d1 <memmem+0x411> >critical_factorization(): >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:151 > p = j - max_suffix; > } > else if (a == b) > { > /* Advance through repetition of the current period. */ > if (k != p) > 935f2: 49 89 d6 mov %rdx,%r14 > 935f5: 48 89 c6 mov %rax,%rsi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:156 > ++k; > else > { > j += p; > k = 1; > 935f8: ba 01 00 00 00 mov $0x1,%edx > 935fd: e9 3e fc ff ff jmpq 93240 <memmem+0x80> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:186 > p = j - max_suffix_rev; > } > else if (a == b) > { > /* Advance through repetition of the current period. */ > if (k != p) > 93602: 49 89 d1 mov %rdx,%r9 > 93605: 48 89 c6 mov %rax,%rsi >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:191 > ++k; > else > { > j += p; > k = 1; > 93608: ba 01 00 00 00 mov $0x1,%edx > 9360d: e9 7e fc ff ff jmpq 93290 <memmem+0xd0> >two_way_short_needle(): >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:261 > { > /* Scan for matches in left half. */ > i = suffix - 1; > pneedle = &needle[i]; > phaystack = &haystack[i + j]; > while (memory < i + 1 && (CANON_ELEMENT (*pneedle--) > 93612: 4c 89 e0 mov %r12,%rax > 93615: e9 cf fd ff ff jmpq 933e9 <memmem+0x229> >/usr/src/debug/glibc-2.16.90-54a41734/string/str-two-way.h:265 > == CANON_ELEMENT (*phaystack--))) > --i; > if (i + 1 < memory + 1) > return (RETURN_TYPE) (haystack + j); > 9361a: 4d 01 d5 add %r10,%r13 > 9361d: e9 e8 fd ff ff jmpq 9340a <memmem+0x24a> >memmem(): > 93622: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) > 93629: 00 00 00 > 9362c: 0f 1f 40 00 nopl 0x0(%rax) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14716
:
6683
|
6684
|
6685