.file "bug.cpp" .text .align 2 .globl _ZN6StringpLERKS_ .type _ZN6StringpLERKS_,@function _ZN6StringpLERKS_: .LFB1: pushl %ebp .LCFI0: movl %esp, %ebp .LCFI1: subl $8, %esp .LCFI2: subl $8, %esp movl 12(%ebp), %eax pushl (%eax) pushl 8(%ebp) .LCFI3: call _ZN6StringpLEPKc addl $16, %esp leave ret .LFE1: .Lfe1: .size _ZN6StringpLERKS_,.Lfe1-_ZN6StringpLERKS_ .align 2 .globl _ZN6StringpLEPKc .type _ZN6StringpLEPKc,@function _ZN6StringpLEPKc: .LFB2: pushl %ebp .LCFI4: movl %esp, %ebp .LCFI5: subl $24, %esp .LCFI6: subl $12, %esp pushl 8(%ebp) .LCFI7: call _ZN6String6lengthEv addl $16, %esp movl %eax, -4(%ebp) subl $12, %esp pushl 12(%ebp) call _ZN6String6strlenEPKc addl $16, %esp movl %eax, -8(%ebp) cmpl $0, -8(%ebp) je .L3 subl $12, %esp movl -8(%ebp), %eax addl -4(%ebp), %eax incl %eax pushl %eax call _Znaj addl $16, %esp movl %eax, -12(%ebp) movl 8(%ebp), %eax cmpl $0, (%eax) je .L4 subl $8, %esp movl 8(%ebp), %eax pushl (%eax) pushl -12(%ebp) call _ZN6String6strcpyEPcPKc addl $16, %esp .L4: subl $8, %esp pushl 12(%ebp) movl -4(%ebp), %eax addl -12(%ebp), %eax pushl %eax call _ZN6String6strcpyEPcPKc addl $16, %esp movl 8(%ebp), %eax cmpl $0, (%eax) je .L5 movl 8(%ebp), %eax cmpl $0, (%eax) je .L5 subl $12, %esp movl 8(%ebp), %eax pushl (%eax) call _ZdaPv addl $16, %esp .L5: movl 8(%ebp), %edx movl -12(%ebp), %eax movl %eax, (%edx) .L3: movl 8(%ebp), %eax leave ret .LFE2: .Lfe2: .size _ZN6StringpLEPKc,.Lfe2-_ZN6StringpLEPKc .align 2 .globl _ZN6String6strlenEPKc .type _ZN6String6strlenEPKc,@function _ZN6String6strlenEPKc: .LFB3: pushl %ebp .LCFI8: movl %esp, %ebp .LCFI9: subl $8, %esp .LCFI10: cmpl $0, 8(%ebp) jne .L9 movl $0, -8(%ebp) jmp .L8 .L9: movl 8(%ebp), %eax movl %eax, -4(%ebp) .L10: movl 8(%ebp), %eax cmpb $0, (%eax) jne .L12 jmp .L11 .L12: incl 8(%ebp) jmp .L10 .L11: movl -4(%ebp), %eax movl 8(%ebp), %edx subl %eax, %edx movl %edx, %eax movl %eax, -8(%ebp) .L8: movl -8(%ebp), %eax leave ret .LFE3: .Lfe3: .size _ZN6String6strlenEPKc,.Lfe3-_ZN6String6strlenEPKc .align 2 .globl _ZN6String6strcpyEPcPKc .type _ZN6String6strcpyEPcPKc,@function _ZN6String6strcpyEPcPKc: .LFB4: pushl %ebp .LCFI11: movl %esp, %ebp .LCFI12: nop .L14: movl 8(%ebp), %eax movl %eax, %ecx movl 12(%ebp), %eax movb (%eax), %dl movb %dl, (%ecx) leal 12(%ebp), %eax incl (%eax) incl 8(%ebp) testb %dl, %dl jne .L14 popl %ebp ret .LFE4: .Lfe4: .size _ZN6String6strcpyEPcPKc,.Lfe4-_ZN6String6strcpyEPcPKc .align 2 .globl _Z6tester6String .type _Z6tester6String,@function _Z6tester6String: .LFB5: pushl %ebp .LCFI13: movl %esp, %ebp .LCFI14: popl %ebp ret .LFE5: .Lfe5: .size _Z6tester6String,.Lfe5-_Z6tester6String .globl _Unwind_Resume .section .rodata .LC0: .string "bug" .LC1: .string "ops: " .text .align 2 .globl main .type main,@function main: .LFB6: pushl %ebp .LCFI15: movl %esp, %ebp .LCFI16: pushl %ebx .LCFI17: subl $68, %esp .LCFI18: andl $-16, %esp movl $0, %eax subl %eax, %esp subl $8, %esp pushl $.LC0 leal -24(%ebp), %eax pushl %eax .LEHB0: .LCFI19: call _ZN6StringC1EPKc .LEHE0: addl $16, %esp .L19: subl $12, %esp subl $12, %esp leal -56(%ebp), %edx subl $12, %esp leal -24(%ebp), %eax pushl %eax pushl $.LC1 pushl %edx .LEHB1: .LCFI20: call _ZplPKcRK6String .LEHE1: addl $20, %esp leal -56(%ebp), %eax pushl %eax leal -40(%ebp), %eax pushl %eax .LEHB2: .LCFI21: call _ZN6StringC1ERKS_ addl $20, %esp leal -40(%ebp), %eax pushl %eax .LCFI22: call _Z6tester6String addl $16, %esp subl $12, %esp leal -40(%ebp), %eax pushl %eax call _ZN6StringD1Ev .LEHE2: addl $16, %esp jmp .L27 .L34: movl %eax, -60(%ebp) movl -60(%ebp), %ebx subl $12, %esp leal -56(%ebp), %eax pushl %eax call _ZN6StringD1Ev addl $16, %esp movl %ebx, -60(%ebp) jmp .L30 .L27: subl $12, %esp leal -56(%ebp), %eax pushl %eax .LEHB3: call _ZN6StringD1Ev .LEHE3: addl $16, %esp jmp .L19 .L35: movl %eax, -60(%ebp) .L30: movl -60(%ebp), %ebx subl $12, %esp leal -24(%ebp), %eax pushl %eax call _ZN6StringD1Ev addl $16, %esp movl %ebx, -60(%ebp) subl $12, %esp pushl -60(%ebp) .LEHB4: call _Unwind_Resume .LEHE4: .LFE6: .Lfe6: .size main,.Lfe6-main .section .gcc_except_table,"aw",@progbits .LLSDA6: .byte 0xff .byte 0xff .byte 0x1 .uleb128 .LLSDACSE6-.LLSDACSB6 .LLSDACSB6: .uleb128 .LEHB0-.LFB6 .uleb128 .LEHE0-.LEHB0 .uleb128 0x0 .uleb128 0x0 .uleb128 .LEHB1-.LFB6 .uleb128 .LEHE1-.LEHB1 .uleb128 .L35-.LFB6 .uleb128 0x0 .uleb128 .LEHB2-.LFB6 .uleb128 .LEHE2-.LEHB2 .uleb128 .L34-.LFB6 .uleb128 0x0 .uleb128 .LEHB3-.LFB6 .uleb128 .LEHE3-.LEHB3 .uleb128 .L35-.LFB6 .uleb128 0x0 .uleb128 .LEHB4-.LFB6 .uleb128 .LEHE4-.LEHB4 .uleb128 0x0 .uleb128 0x0 .LLSDACSE6: .text .section .gnu.linkonce.t._ZN6StringC1EPKc,"ax",@progbits .align 2 .weak _ZN6StringC1EPKc .type _ZN6StringC1EPKc,@function _ZN6StringC1EPKc: .LFB7: pushl %ebp .LCFI23: movl %esp, %ebp .LCFI24: pushl %ebx .LCFI25: subl $4, %esp .LCFI26: movl 8(%ebp), %ebx subl $12, %esp pushl 12(%ebp) .LCFI27: call _ZN6String6strlenEPKc addl $4, %esp incl %eax pushl %eax .LCFI28: call _Znaj addl $16, %esp movl %eax, (%ebx) subl $8, %esp pushl 12(%ebp) movl 8(%ebp), %eax pushl (%eax) call _ZN6String6strcpyEPcPKc addl $16, %esp movl -4(%ebp), %ebx leave ret .LFE7: .Lfe7: .size _ZN6StringC1EPKc,.Lfe7-_ZN6StringC1EPKc .section .gnu.linkonce.t._ZN6StringC1ERKS_,"ax",@progbits .align 2 .weak _ZN6StringC1ERKS_ .type _ZN6StringC1ERKS_,@function _ZN6StringC1ERKS_: .LFB8: pushl %ebp .LCFI29: movl %esp, %ebp .LCFI30: subl $8, %esp .LCFI31: movl 8(%ebp), %eax movl $0, (%eax) subl $8, %esp movl 12(%ebp), %eax pushl (%eax) pushl 8(%ebp) .LCFI32: call _ZN6StringaSEPKc addl $16, %esp leave ret .LFE8: .Lfe8: .size _ZN6StringC1ERKS_,.Lfe8-_ZN6StringC1ERKS_ .section .gnu.linkonce.t._ZN6StringD1Ev,"ax",@progbits .align 2 .weak _ZN6StringD1Ev .type _ZN6StringD1Ev,@function _ZN6StringD1Ev: .LFB9: pushl %ebp .LCFI33: movl %esp, %ebp .LCFI34: subl $8, %esp .LCFI35: movl 8(%ebp), %eax cmpl $0, (%eax) je .L38 movl 8(%ebp), %eax cmpl $0, (%eax) je .L38 subl $12, %esp movl 8(%ebp), %eax pushl (%eax) .LCFI36: call _ZdaPv addl $16, %esp .L38: leave ret .LFE9: .Lfe9: .size _ZN6StringD1Ev,.Lfe9-_ZN6StringD1Ev .section .gnu.linkonce.t._ZN6String6lengthEv,"ax",@progbits .align 2 .weak _ZN6String6lengthEv .type _ZN6String6lengthEv,@function _ZN6String6lengthEv: .LFB10: pushl %ebp .LCFI37: movl %esp, %ebp .LCFI38: subl $8, %esp .LCFI39: subl $12, %esp movl 8(%ebp), %eax pushl (%eax) .LCFI40: call _ZN6String6strlenEPKc addl $16, %esp leave ret .LFE10: .Lfe10: .size _ZN6String6lengthEv,.Lfe10-_ZN6String6lengthEv .section .gnu.linkonce.t._ZplPKcRK6String,"ax",@progbits .align 2 .weak _ZplPKcRK6String .type _ZplPKcRK6String,@function _ZplPKcRK6String: .LFB11: pushl %ebp .LCFI41: movl %esp, %ebp .LCFI42: pushl %ebx .LCFI43: subl $36, %esp .LCFI44: subl $8, %esp pushl 12(%ebp) leal -24(%ebp), %eax pushl %eax .LEHB5: .LCFI45: call _ZN6StringC1EPKc .LEHE5: addl $16, %esp subl $8, %esp pushl 16(%ebp) leal -24(%ebp), %eax pushl %eax .LEHB6: call _ZN6StringpLERKS_ addl $16, %esp subl $8, %esp leal -24(%ebp), %eax pushl %eax pushl 8(%ebp) call _ZN6StringC1ERKS_ .LEHE6: addl $16, %esp subl $12, %esp leal -24(%ebp), %eax pushl %eax call _ZN6StringD1Ev addl $16, %esp jmp .L45 .L50: movl %eax, -28(%ebp) movl -28(%ebp), %ebx subl $12, %esp leal -24(%ebp), %eax pushl %eax call _ZN6StringD1Ev addl $16, %esp movl %ebx, -28(%ebp) subl $12, %esp pushl -28(%ebp) .LEHB7: call _Unwind_Resume .LEHE7: .L45: movl 8(%ebp), %eax movl -4(%ebp), %ebx leave ret $4 .LFE11: .Lfe11: .size _ZplPKcRK6String,.Lfe11-_ZplPKcRK6String .section .gcc_except_table .LLSDA11: .byte 0xff .byte 0xff .byte 0x1 .uleb128 .LLSDACSE11-.LLSDACSB11 .LLSDACSB11: .uleb128 .LEHB5-.LFB11 .uleb128 .LEHE5-.LEHB5 .uleb128 0x0 .uleb128 0x0 .uleb128 .LEHB6-.LFB11 .uleb128 .LEHE6-.LEHB6 .uleb128 .L50-.LFB11 .uleb128 0x0 .uleb128 .LEHB7-.LFB11 .uleb128 .LEHE7-.LEHB7 .uleb128 0x0 .uleb128 0x0 .LLSDACSE11: .section .gnu.linkonce.t._ZplPKcRK6String .section .gnu.linkonce.t._ZN6StringaSEPKc,"ax",@progbits .align 2 .weak _ZN6StringaSEPKc .type _ZN6StringaSEPKc,@function _ZN6StringaSEPKc: .LFB12: pushl %ebp .LCFI46: movl %esp, %ebp .LCFI47: pushl %ebx .LCFI48: subl $4, %esp .LCFI49: movl 8(%ebp), %eax cmpl $0, (%eax) je .L52 movl 8(%ebp), %eax cmpl $0, (%eax) je .L52 subl $12, %esp movl 8(%ebp), %eax pushl (%eax) .LCFI50: call _ZdaPv addl $16, %esp .L52: cmpl $0, 12(%ebp) je .L55 movl 8(%ebp), %ebx subl $12, %esp pushl 12(%ebp) .LCFI51: call _ZN6String6strlenEPKc addl $4, %esp incl %eax pushl %eax .LCFI52: call _Znaj addl $16, %esp movl %eax, (%ebx) subl $8, %esp pushl 12(%ebp) movl 8(%ebp), %eax pushl (%eax) call _ZN6String6strcpyEPcPKc addl $16, %esp jmp .L56 .L55: movl 8(%ebp), %eax movl $0, (%eax) .L56: movl 8(%ebp), %eax movl -4(%ebp), %ebx leave ret .LFE12: .Lfe12: .size _ZN6StringaSEPKc,.Lfe12-_ZN6StringaSEPKc .section .eh_frame,"aw",@progbits .Lframe1: .long .LECIE1-.LSCIE1 .LSCIE1: .long 0x0 .byte 0x1 .string "zPL" .uleb128 0x1 .sleb128 -4 .byte 0x8 .uleb128 0x6 .byte 0x0 .long __gxx_personality_v0 .byte 0x0 .byte 0xc .uleb128 0x4 .uleb128 0x4 .byte 0x88 .uleb128 0x1 .align 4 .LECIE1: .LSFDE1: .long .LEFDE1-.LASFDE1 .LASFDE1: .long .LASFDE1-.Lframe1 .long .LFB1 .long .LFE1-.LFB1 .uleb128 0x4 .long 0x0 .byte 0x4 .long .LCFI0-.LFB1 .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 0x10 .align 4 .LEFDE1: .LSFDE3: .long .LEFDE3-.LASFDE3 .LASFDE3: .long .LASFDE3-.Lframe1 .long .LFB2 .long .LFE2-.LFB2 .uleb128 0x4 .long 0x0 .byte 0x4 .long .LCFI4-.LFB2 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI5-.LCFI4 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI7-.LCFI5 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE3: .LSFDE11: .long .LEFDE11-.LASFDE11 .LASFDE11: .long .LASFDE11-.Lframe1 .long .LFB6 .long .LFE6-.LFB6 .uleb128 0x4 .long .LLSDA6 .byte 0x4 .long .LCFI15-.LFB6 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI16-.LCFI15 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI18-.LCFI16 .byte 0x83 .uleb128 0x3 .byte 0x4 .long .LCFI19-.LCFI18 .byte 0x2e .uleb128 0x10 .byte 0x4 .long .LCFI20-.LCFI19 .byte 0x2e .uleb128 0x18 .byte 0x4 .long .LCFI21-.LCFI20 .byte 0x2e .uleb128 0x14 .byte 0x4 .long .LCFI22-.LCFI21 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE11: .LSFDE13: .long .LEFDE13-.LASFDE13 .LASFDE13: .long .LASFDE13-.Lframe1 .long .LFB7 .long .LFE7-.LFB7 .uleb128 0x4 .long 0x0 .byte 0x4 .long .LCFI23-.LFB7 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI24-.LCFI23 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI26-.LCFI24 .byte 0x83 .uleb128 0x3 .byte 0x4 .long .LCFI27-.LCFI26 .byte 0x2e .uleb128 0x4 .byte 0x4 .long .LCFI28-.LCFI27 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE13: .LSFDE15: .long .LEFDE15-.LASFDE15 .LASFDE15: .long .LASFDE15-.Lframe1 .long .LFB8 .long .LFE8-.LFB8 .uleb128 0x4 .long 0x0 .byte 0x4 .long .LCFI29-.LFB8 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI30-.LCFI29 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI32-.LCFI30 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE15: .LSFDE21: .long .LEFDE21-.LASFDE21 .LASFDE21: .long .LASFDE21-.Lframe1 .long .LFB11 .long .LFE11-.LFB11 .uleb128 0x4 .long .LLSDA11 .byte 0x4 .long .LCFI41-.LFB11 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI42-.LCFI41 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI44-.LCFI42 .byte 0x83 .uleb128 0x3 .byte 0x4 .long .LCFI45-.LCFI44 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE21: .LSFDE23: .long .LEFDE23-.LASFDE23 .LASFDE23: .long .LASFDE23-.Lframe1 .long .LFB12 .long .LFE12-.LFB12 .uleb128 0x4 .long 0x0 .byte 0x4 .long .LCFI46-.LFB12 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI47-.LCFI46 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI49-.LCFI47 .byte 0x83 .uleb128 0x3 .byte 0x4 .long .LCFI50-.LCFI49 .byte 0x2e .uleb128 0x10 .byte 0x4 .long .LCFI51-.LCFI50 .byte 0x2e .uleb128 0x4 .byte 0x4 .long .LCFI52-.LCFI51 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE23: .ident "GCC: (GNU) 3.2"