Commit d7a7636
Core: Guard vmlinux struct lookup against non-class metadata
_allocate_for_attribute reached for `metadata.__name__` whenever the
base symbol was not a known user struct, but `metadata` is only a struct
class for struct-typed symbols. For a symbol carrying None (any plainly
typed local) or a ctypes class (a `c_void_p` context parameter), that
raised AttributeError instead of reporting the unsupported access.
Resolve the name via getattr and fall through to the existing
"struct type not found" diagnostic when there is none.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent b47063c commit d7a7636
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
344 | 351 | | |
345 | | - | |
346 | 352 | | |
347 | 353 | | |
348 | 354 | | |
| |||
0 commit comments