Repository navigation
feat: speed up incoming packet parsing - #1830
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1830 +/- ##
=======================================
Coverage 99.86% 99.87%
=======================================
Files 33 33
Lines 3839 3883 +44
Branches 553 567 +14
=======================================
+ Hits 3834 3878 +44
Misses 3 3
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
59015cd to
8448b77
Compare
|
Just waiting for ASAN locally |
|
local ASan 50,000 hostile packets + all 14 audit boundary packets, zero sanitizer reports. |
Matches static audit. Traced all buffer reads independently: header, questions, record header, SRV, character string, string, NSEC bitmap, name fast path, label pointer. Each guarded before dereference. Label slice correctly stays on One gap: fuzz strategies cap at |
|
|
bluetoothbot
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
Nobody is pickling DNSIncoming, that would be a crazy use case. Its not intended to be a public API. This is an internal safety |
Fair — dropping that finding. Grepped repo: nothing pickles or copies |
bluetoothbot
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.

Summary
Speeds up
DNSIncomingparsing by 47 percent; the benchmark packet drops from 9.3µs to 4.9µs on the compiled build. Stacked on #1829 so the fuzzing suite guards every change.Details
_read_bitmapindexes the buffer directly instead of allocating a bytes slice per NSEC record, and skips zero bytesDNSIncomingnow refuses pickling,datais readonly, both closing lifetime holes the raw pointer would otherwise openTest plan
poetry run pytest testspasses, 495 passed; pre-commit clean; Cython annotate maps show the added score confined to cold raise blocks and the 8x slow path