Commit 059aa20
authored
Fix IRBuilder on local operations outside of a function context (#7183)
IRBuilder needs to check for a function context before doing
func->getLocalType(). Without such a check, a bad binary with a local
operation in say a global init would lead to a crash.
We don't actually need this for local.set, unlike tee and get, since
it doesn't call getLocalType, but this PR adds that too for consistency
of errors.
No other operations in IRBuilder were missing this check aside from
local operations.
Fixes #71781 parent 1911e0b commit 059aa20
7 files changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1262 | 1265 | | |
1263 | 1266 | | |
1264 | 1267 | | |
1265 | 1268 | | |
1266 | 1269 | | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1267 | 1273 | | |
1268 | 1274 | | |
1269 | 1275 | | |
| |||
1272 | 1278 | | |
1273 | 1279 | | |
1274 | 1280 | | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
1275 | 1284 | | |
1276 | 1285 | | |
1277 | 1286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Binary file not shown.
0 commit comments