Commit 94219a4
committed
Add proper error for attempted use of undef slot
Fixes the segfault in #50518 and turns it into a proper error at
both the syntax level (to catch lowering generating bad slot references)
as well as at the codegen level (to catch e.g. bad generated functions
and opaque closures). However, note that the latter case is technically
undefined behavior, because we do not model the possibility that an
otherwise-defined argument could throw at access time. Of course,
throwing an error is allowable as undefined behavior and preferable
to a segfault.1 parent ae08077 commit 94219a4
3 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4921 | 4921 | | |
4922 | 4922 | | |
4923 | 4923 | | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
4924 | 4930 | | |
4925 | 4931 | | |
4926 | 4932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5051 | 5051 | | |
5052 | 5052 | | |
5053 | 5053 | | |
5054 | | - | |
| 5054 | + | |
| 5055 | + | |
5055 | 5056 | | |
5056 | 5057 | | |
5057 | 5058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3507 | 3507 | | |
3508 | 3508 | | |
3509 | 3509 | | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
0 commit comments