Skip to content

Crash in Clang: Unexpected Xtensa GCC toolchain version (LLVM-160) #56

Closed
@aykevl

Description

@aykevl

I got this crash with assertions enabled:

Unexpected Xtensa GCC toolchain version
UNREACHABLE executed at /home/ayke/src/github.com/tinygo-org/tinygo/llvm-project/clang/lib/Driver/ToolChains/Xtensa.cpp:41!
libclang: crash detected during parsing: {
  'source_filename' : 'extra.go!cgo.c'
  'command_line_args' : ['clang', '-D_FORTIFY_SOURCE=0', '-Werror', '-fshort-enums', '-Wno-macro-redefined', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-ffunction-sections', '-fdata-sections', '--sysroot=/home/ayke/.cache/tinygo/picolibc-xtensa-esp32', '-isystem', '/home/ayke/src/github.com/tinygo-org/tinygo/lib/picolibc/newlib/libc/include', '-isystem', '/home/ayke/src/github.com/tinygo-org/tinygo/lib/picolibc/newlib/libc/tinystdio', '-g', '-Oz', '--target=xtensa', '-mcpu=esp32', '-I/home/ayke/src/github.com/tinygo-org/tinygo/testdata/cgo', '-DSOME_CONSTANT=17', '-isystem', '/home/ayke/src/github.com/tinygo-org/tinygo/llvm-project/clang/lib/Headers'],
  'unsaved_files' : [('extra.go!cgo.c', '...', 551)],
  'options' : 1,
}

This is the relevant code:

  if (!GCCInstallation.isValid()) {
    llvm_unreachable("Unexpected Xtensa GCC toolchain version");
  }

I did not yet investigate this further or create a small reproducer. Will hopefully do that soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions