llvm / llvm/llvm-project

Crash in TableGen parser

Open
#184,879 5 comments 0 reactions 0 assignees View on GitHub
crash-on-invalid tablegen
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

For the following input file:

```
class X {
int F = 0;
int D = !add(F, 1);
}

class Y : X {
string F = "0";
}
```

tablegen hits an isa<> assert during parsing:

```
test.td:7:14: error: Field 'F' of type 'int' is incompatible with value '"0"' of type 'string'
string F = "0";
^
llvm-tblgen: llvm/include/llvm/Support/Casting.h:109: static bool llvm::isa_impl_cl::doit(const From *) [To = llvm::UnsetInit, From = const llvm::Init *]: Assertion `Val && "isa<> used on a null pointer"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.