Skip to content

[Bug]: Clang Optimizer SEGFAULT while attempting to compile under certain conditions #1677

@Fernthedev

Description

@Fernthedev

Description

Under the circumstances explained in this test file, clang's optimizer segfaults. I can't tell with certainty what causes this SEGFAULT but hopefully this small test case is sufficient. If -O0 is provided as a compile flag, the SEGFAULT no longer occurs.

As the crash suggests, here are the diagnostic files: https://gist.github.com/Fernthedev/8e10c49fcf775b4a34bb51ed3e586eda

Building the project to reproduce the crash

The branch test-case of the repository is designed to work out of the box with no configuration outside of Ninja, CMake and NDK.

  • Create a ndkpath.txt file pointing to your ndk installation
  • Invoke pwsh .\build.ps1 or manually invoke CMake if you prefer

Appreciate any guidance and fixes, good day.

Upstream bug

No response

Commit to cherry-pick

No response

Affected versions

r23, r24

Canary version

No response

Host OS

Windows

Host OS version

Windows 10 21H2 (19044.1526)

Affected ABIs

arm64-v8a

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions