rendered paste bodyhell@hells:/tmp/ctest$ cat 1.cpp
#include <memory.h>
#include <stdio.h>
int main(void)
{
char x[10];
char y[10];
char z=9;
memset(x+z,0,1);
y[z]=0;
printf("%c %c", x[z], y[z] );
return 0;
}
hell@hells:/tmp/ctest$ cat 1.s
.file "1.cpp"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "%c %c"
.text
.align 2
.globl main
.type main, @function
main:
.LFB2:
pushl %ebp
.LCFI0:
movl %esp, %ebp
.LCFI1:
subl $12, %esp
.LCFI2:
pushl $0
pushl $0
pushl $.LC0
movb $0, -1(%ebp)
.LCFI3:
call printf
xorl %eax, %eax
leave
ret
.LFE2:
.size main, .-main
.globl __gxx_personality_v0
.section .eh_frame,"a",@progbits
.Lframe1:
.long .LECIE1-.LSCIE1
.LSCIE1:
.long 0x0
.byte 0x1
.string "zP"
.uleb128 0x1
.sleb128 -4
.byte 0x8
.uleb128 0x5
.byte 0x0
.long __gxx_personality_v0
.byte 0xc
.uleb128 0x4
.uleb128 0x4
.byte 0x88
.uleb128 0x1
.align 4
.LECIE1:
.LSFDE1:
.long .LEFDE1-.LASFDE1
.LASFDE1:
.long .LASFDE1-.Lframe1
.long .LFB2
.long .LFE2-.LFB2
.uleb128 0x0
.byte 0x4
.long .LCFI0-.LFB2
.byte 0xe
.uleb128 0x8
.byte 0x85
.uleb128 0x2
.byte 0x4
.long .LCFI1-.LCFI0
.byte 0xd
.uleb128 0x5
.byte 0x4
.long .LCFI3-.LCFI1
.byte 0x2e
.uleb128 0xc
.align 4
.LEFDE1:
.ident "GCC: (GNU) 4.1.2 20060613 (prerelease) (Debian 4.1.1-5)"
.section .note.GNU-stack,"",@progbits
hell@hells:/tmp/ctest$