Commit 561f38d
authored
Fix empty DW_AT_location for reused loop variables (#811)
Nvbug5886953 exposes an issue that reused loop index variables have a
DWARF location list with corrupted entries.
The root cause is in the base class `Lower.loadvar`, which suppresses
`!dbg` metadata on loads of function argument variables. This causes
NVVM to emit `.loc line 0` between the loops, and `ptxas` builds a
multi-entry location list where the line-0 ranges inserted between
entries corrupt it, producing an empty `DW_AT_location` in the final
DWARF.
This PR overrides `loadvar` in `CUDALower` to skip the suppression. The
suppression is unnecessary because `loadvar` is never called during the
prologue — arg unpacking in `lower_assign` and `storevar` already handle
suppression there.
Also add `test_arg_load_has_dbg_location` regression test.
Fixes nvbug5886953.1 parent dd2e942 commit 561f38d
File tree
2 files changed
+40
-0
lines changed- numba_cuda/numba/cuda
- tests/cudapy
2 files changed
+40
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
1698 | 1713 | | |
1699 | 1714 | | |
1700 | 1715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1215 | 1240 | | |
1216 | 1241 | | |
1217 | 1242 | | |
0 commit comments