mirror of
https://github.com/morluto/rea.git
synced 2026-12-01 00:29:08 +00:00
fix(gpu): keep the PTX target unknown when braces are unbalanced (#12888)
readPtxTarget clamped an unmatched `}` to depth zero and never checked for a body still open at end of text, so standalone PTX that kernel inspection rejects as "Unbalanced PTX body" or "Truncated PTX entry declaration" still reported complete discovery and an established target. Treat both cases as malformed text at the target reader so inventory and kernel inspection agree. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3624a9c1ab
commit
313e89206d
3 files changed
+51
-2
No files matched your search
@@ -194,7 +194,9 @@ whitespace, after which `.version` must be the first module token. Inventory and
|
||||
kernel inspection use strict UTF-8 and reuse a complete, valid scan. Invalid
|
||||
encoding can leave a recognizable PTX object with an unknown target. A file
|
||||
longer than the scan budget, including one that ends mid-character at the
|
||||
budget, gives partial discovery.
|
||||
budget, gives partial discovery. An unmatched `}` or a body still open at the end
|
||||
of the text also leaves the target unknown, matching the unbalanced body that
|
||||
kernel inspection rejects.
|
||||
|
||||
## Read PTX text
|
||||
|
||||
|
||||
Reference in new issue
Block a user