Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang] clang hangs when instantiate an array of fixed points. #83050

Closed
lntue opened this issue Feb 26, 2024 · 2 comments · Fixed by #83071
Closed

[clang] clang hangs when instantiate an array of fixed points. #83050

lntue opened this issue Feb 26, 2024 · 2 comments · Fixed by #83071
Assignees
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" hang Compiler hang (infinite loop)

Comments

@lntue
Copy link
Contributor

lntue commented Feb 26, 2024

clang hangs with:

static constexpr unsigned short _Fract A[][] = { 0x1.0p-1uhr, ... };

https://godbolt.org/z/rcfe6qa4b

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Feb 26, 2024
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" hang Compiler hang (infinite loop) and removed clang Clang issues not falling into any other category labels Feb 26, 2024
@llvmbot
Copy link

llvmbot commented Feb 26, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (lntue)

clang hangs with: ``` static constexpr unsigned short _Fract A[][] = { 0x1.0p-1uhr, ... }; ``` https://godbolt.org/z/rcfe6qa4b

@PiJoules
Copy link
Contributor

Fix at #83071

PiJoules added a commit to PiJoules/llvm-project that referenced this issue Feb 26, 2024
Clang was incorrectly finding the start of the exponent in a fixed point
hex literal. It would unconditionally find the first `e/E/p/P` in a
constant regardless of if it were hex or not and parser the remaining
digits as an APInt. In a debug build, this would be caught by an
assertion, but in a release build, the assertion is removed and we'd end
up in an infinite loop.

Fixes llvm#83050
PiJoules added a commit that referenced this issue Feb 26, 2024
Clang was incorrectly finding the start of the exponent in a fixed point
hex literal. It would unconditionally find the first `e/E/p/P` in a
constant regardless of if it were hex or not and parser the remaining
digits as an APInt. In a debug build, this would be caught by an
assertion, but in a release build, the assertion is removed and we'd end
up in an infinite loop.

Fixes #83050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" hang Compiler hang (infinite loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants