google / google/xls

ConstexprEvaluator blows up on empty array

Open
#665 0 comments 0 reactions 0 assignees View on GitHub
dslx
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

The following DSLX causes a boom (out-of-bounds vector access) in the constexpr evaluator:

```
type Block = u8[4][4];

fn foo() {
let bar = Block:[];
()
}
```

1. The ConstexprEvaluator should not explode ever
2. Parsing should flag this as an error.

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.