public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/103925] New: Missing int3 in ix86_output_indirect_function_return
@ 2022-01-06  2:03 hjl.tools at gmail dot com
  2022-01-06  2:47 ` [Bug target/103925] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-06  2:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103925

            Bug ID: 103925
           Summary: Missing int3 in ix86_output_indirect_function_return
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: andrew.cooper3 at citrix dot com, ubizjak at gmail dot com
  Target Milestone: ---

[hjl@gnu-tgl-2 tmp]$ cat foo.c
struct _Unwind_Context _Unwind_Resume_or_Rethrow_this_context;

void offset (int);

struct _Unwind_Context {
  void *reg[7];
} _Unwind_Resume_or_Rethrow() {
  struct _Unwind_Context cur_contextcur_context =
      _Unwind_Resume_or_Rethrow_this_context;
  offset(0);
  __builtin_eh_return ((long) offset, 0);
}
[hjl@gnu-tgl-2 tmp]$ /usr/gcc-12.0.0-x32/bin/gcc -S -O2 -fcf-protection
-mharden-sls=all foo.c 
[hjl@gnu-tgl-2 tmp]$ cat foo.s
        .file   "foo.c"
        .text
        .p2align 4
        .globl  _Unwind_Resume_or_Rethrow
        .type   _Unwind_Resume_or_Rethrow, @function
_Unwind_Resume_or_Rethrow:
.LFB0:
        .cfi_startproc
        endbr64
        pushq   %rdx
        .cfi_def_cfa_offset 16
        .cfi_offset 1, -16
        xorl    %edi, %edi
        pushq   %rax
        .cfi_def_cfa_offset 24
        .cfi_offset 0, -24
        subq    $8, %rsp
        .cfi_def_cfa_offset 32
        call    offset
        movl    $offset, %ecx
        movq    $0, 24(%rsp,%rcx)
        movq    8(%rsp), %rax
        movq    16(%rsp), %rdx
        leaq    24(%rsp,%rcx), %rsp
        .cfi_def_cfa_offset 8
        popq    %rcx
        .cfi_register 16, 2
        .cfi_def_cfa_offset 0
        jmp     *%rcx <<<< Missing int3
        .cfi_endproc
.LFE0:
        .size   _Unwind_Resume_or_Rethrow, .-_Unwind_Resume_or_Rethrow
        .globl  _Unwind_Resume_or_Rethrow_this_context
        .bss
        .align 32
        .type   _Unwind_Resume_or_Rethrow_this_context, @object
        .size   _Unwind_Resume_or_Rethrow_this_context, 56
_Unwind_Resume_or_Rethrow_this_context:
        .zero   56
        .ident  "GCC: (GNU) 12.0.0 20211225 (experimental)"
        .section        .note.GNU-stack,"",@progbits
        .section        .note.gnu.property,"a"
        .align 8
        .long   1f - 0f
        .long   4f - 1f
        .long   5
0:
        .string "GNU"
1:
        .align 8
        .long   0xc0000002
        .long   3f - 2f
2:
        .long   0x3
3:
        .align 8
4:
[hjl@gnu-tgl-2 tmp]$

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

end of thread, other threads:[~2022-02-16 14:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06  2:03 [Bug target/103925] New: Missing int3 in ix86_output_indirect_function_return hjl.tools at gmail dot com
2022-01-06  2:47 ` [Bug target/103925] " pinskia at gcc dot gnu.org
2022-01-06  2:54 ` hjl.tools at gmail dot com
2022-01-06  2:56 ` pinskia at gcc dot gnu.org
2022-01-06 19:53 ` cvs-commit at gcc dot gnu.org
2022-01-06 20:12 ` hjl.tools at gmail dot com
2022-02-16 14:01 ` cvs-commit 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).