Skip to content

Commit bac905a

Browse files
committed
test(p1a): pin fully-qualified System.Xml factory regressions
CodeRabbit: the P1a leak loop only exercised the FQN form for JsonDocument.Parse. Add System.Xml.XmlReader.Create and System.Xml.XmlWriter.Create FQNs too, so each new table entry is pinned end-to-end (bare + namespace-qualified). ownir 208/208, ruff clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019846YSZ35c7CdkWQ1qX5gm
1 parent 77bfc07 commit bac905a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎tests/test_ownir.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,9 +1694,12 @@ def _bcl(body: list) -> list:
16941694
# P1a (stdlib pack): more curated owned-returning factories. A dropped XmlReader/XmlWriter/
16951695
# JsonDocument result leaks at the factory call (OWN001), the same producer-side contract as
16961696
# File.Open* — both the bare `Type.Method` and the namespace-qualified identity resolve.
1697-
for fresh_callee, ln in (("XmlReader.Create", 5), ("XmlWriter.Create", 6),
1698-
("JsonDocument.Parse", 7),
1699-
("System.Text.Json.JsonDocument.Parse", 8)):
1697+
for fresh_callee, ln in (("XmlReader.Create", 5),
1698+
("System.Xml.XmlReader.Create", 6),
1699+
("XmlWriter.Create", 7),
1700+
("System.Xml.XmlWriter.Create", 8),
1701+
("JsonDocument.Parse", 9),
1702+
("System.Text.Json.JsonDocument.Parse", 10)):
17001703
checks += 1
17011704
leak = [(x.code, x.line) for x in _bcl(
17021705
[{"op": "call", "callee": fresh_callee, "args": ["a"], "result": "s", "line": ln}])]

0 commit comments

Comments
 (0)