This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug string/22353] New: sysdeps/i386/i586/strcpy.S isn't maintainable
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 26 Oct 2017 23:24:28 +0000
- Subject: [Bug string/22353] New: sysdeps/i386/i586/strcpy.S isn't maintainable
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22353
Bug ID: 22353
Summary: sysdeps/i386/i586/strcpy.S isn't maintainable
Product: glibc
Version: 2.27
Status: NEW
Severity: normal
Priority: P2
Component: string
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: i586
sysdeps/i386/i586/strcpy.S has
andl $3, %ecx
#ifdef PIC
call 2f
cfi_adjust_cfa_offset (4)
2: popl %edx
cfi_adjust_cfa_offset (-4)
/* 0xb is the distance between 2: and 1: but we avoid writing
1f-2b because the assembler generates worse code. */
leal 0xb(%edx,%ecx,8), %ecx
#else
leal 1f(,%ecx,8), %ecx
#endif
jmp *%ecx
.align 8
1:
orb (%esi), %al
jz L(end)
stosb
xorl %eax, %eax
incl %esi
orb (%esi), %al
jz L(end)
stosb
xorl %eax, %eax
incl %esi
orb (%esi), %al
jz L(end)
stosb
xorl %eax, %eax
incl %esi
L(1): movl (%esi), %ecx
leal 4(%esi),%esi
Change a single instruction will break the jump table.
--
You are receiving this mail because:
You are on the CC list for the bug.