https://sourceware.org/bugzilla/show_bug.cgi?id=35078

            Bug ID: 35078
           Summary: aarch64: gas segfaults on .cfi_b_key_frame without
                    .cfi_startproc
           Product: binutils
           Version: 2.47
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: mumumu0722 at gmail dot com
  Target Milestone: ---

Hello,

gas crashes with a segmentation fault on .cfi_b_key_frame when there is
no preceding .cfi_startproc.

$ cat aarch64-gas-cfi-b-key-frame-outside-proc.s
        .cfi_b_key_frame

$ aarch64-linux-gnu-as --version
GNU assembler (GNU Binutils) 2.47.50.20261122
$ aarch64-linux-gnu-as aarch64-gas-cfi-b-key-frame-outside-proc.s -o t.o
aarch64-gas-cfi-b-key-frame-outside-proc.s: Assembler messages:
aarch64-gas-cfi-b-key-frame-outside-proc.s:1: Internal error (Segmentation
fault).
Please report this bug.

The same issue occurs with .cfi_mte_tagged_frame.

Expected: an error, as for other CFI directives such as .cfi_negate_ra_state:

  Error: CFI instruction used without previous .cfi_startproc

Godbolt: https://godbolt.org/z/bqEY5o51x

This issue was found by fuzzing/automated testing

Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to