public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/55844] New: -fsanitize=address -Os -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 doesn't work
@ 2013-01-02  6:26 hjl.tools at gmail dot com
  2013-01-02  7:13 ` [Bug sanitizer/55844] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2013-01-02  6:26 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55844

             Bug #: 55844
           Summary: -fsanitize=address -Os -fno-omit-frame-pointer
                    -mno-omit-leaf-frame-pointer -m64 doesn't work
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
                    jakub@gcc.gnu.org, kcc@gcc.gnu.org


c-c++-common/asan/null-deref-1.c fails with -m64 since

-fsanitize=address -Os -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-m64 

still omit frame pointer:

[hjl@gnu-tools-1 gcc]$  cat /tmp/x.c
void
NullDeref(int *ptr)
{
  ptr[10]++;
}
[hjl@gnu-tools-1 gcc]$
/export/build/gnu/gcc-x32-mx32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32-mx32/build-x86_64-linux/gcc/ /tmp/x.c   -S   -Os 
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -m64 -fsanitize=address
[hjl@gnu-tools-1 gcc]$ cat x.s
    .file    "x.c"
    .text
    .globl    NullDeref
    .type    NullDeref, @function
NullDeref:
.LFB0:
    .cfi_startproc
    movq    %rdi, %rax
    leaq    40(%rdi), %rdi
    movabsq    $17592186044416, %rdx
    movq    %rdi, %rcx
    shrq    $3, %rcx
    movb    (%rcx,%rdx), %dl
    movq    %rdi, %rcx
    andl    $7, %ecx
    addl    $3, %ecx
    cmpb    %dl, %cl
    jl    .L2
    testb    %dl, %dl
    je    .L2
    pushq    %rbp
    .cfi_def_cfa_offset 16
    .cfi_offset 6, -16
    movq    %rsp, %rbp
    .cfi_def_cfa_register 6
    call    __asan_report_load4
.L2:
    .cfi_def_cfa 7, 8
    .cfi_restore 6
    incl    40(%rax)
    ret
    .cfi_endproc
.LFE0:
    .size    NullDeref, .-NullDeref
    .section    .text.startup,"ax",@progbits
    .type    _GLOBAL__sub_I_00099_0_NullDeref, @function
_GLOBAL__sub_I_00099_0_NullDeref:
.LFB1:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    .cfi_offset 6, -16
    movq    %rsp, %rbp
    .cfi_def_cfa_register 6
    popq    %rbp
    .cfi_def_cfa 7, 8
    jmp    __asan_init
    .cfi_endproc
.LFE1:
    .size    _GLOBAL__sub_I_00099_0_NullDeref,
.-_GLOBAL__sub_I_00099_0_NullDeref
    .section    .init_array.00099,"aw"
    .align 8
    .quad    _GLOBAL__sub_I_00099_0_NullDeref
    .ident    "GCC: (GNU) 4.8.0 20130101 (experimental)"
    .section    .note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 gcc]$
/export/build/gnu/gcc-x32-mx32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32-mx32/build-x86_64-linux/gcc/ /tmp/x.c   -S   -Os 
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -m64 
[hjl@gnu-tools-1 gcc]$ cat x.s
    .file    "x.c"
    .text
    .globl    NullDeref
    .type    NullDeref, @function
NullDeref:
.LFB0:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    .cfi_offset 6, -16
    incl    40(%rdi)
    movq    %rsp, %rbp
    .cfi_def_cfa_register 6
    popq    %rbp
    .cfi_def_cfa 7, 8
    ret
    .cfi_endproc
.LFE0:
    .size    NullDeref, .-NullDeref
    .ident    "GCC: (GNU) 4.8.0 20130101 (experimental)"
    .section    .note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 gcc]$


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-08  8:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-02  6:26 [Bug sanitizer/55844] New: -fsanitize=address -Os -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 doesn't work hjl.tools at gmail dot com
2013-01-02  7:13 ` [Bug sanitizer/55844] " pinskia at gcc dot gnu.org
2013-01-02  7:31 ` jakub at gcc dot gnu.org
2013-01-02 17:31 ` kcc at gcc dot gnu.org
2013-01-02 21:07 ` jakub at gcc dot gnu.org
2013-01-03  6:18 ` kcc at gcc dot gnu.org
2013-01-08  8:14 ` jakub at gcc dot gnu.org
2013-01-08  8:45 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).