Fix findCounter infinite loop; corpus filter skips chunks past 256 MB
lastIndexOf('(', -1) searches from 0 again, so a subject starting with a "("
that isn't a counter, without a quote, looped forever. The corpus filter hit
it at 11:23 on Oct 24: the coordinator (and corpus:filter) spun at 100% CPU
for 10 hours and no range finished. The Rust find_counter stops at 0 already.
A chunk inflating past V8's longest string can't be filtered as text; such a
chunk is now stored unfiltered instead of throwing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2dd5b4cd81
commit
03ca96b255
3 files changed
+10
-1
No files matched your search
@@ -37,5 +37,8 @@ test.group('edge / scanOverviewText and SegmentScanner', () => {
|
||||
// Obfuscated, or a counter only before the name: no segment.
|
||||
assert.isNull(scanner.segment(9, 'Xq8r2KdLm3Zw91PqA7zz', 'p', '', '<o@x>', '1', xref, 'alt.binaries.test'))
|
||||
assert.isNull(scanner.segment(9, '(1/2) "x.bin" yEnc', 'p', '', '<o@x>', '1', xref, 'alt.binaries.test'))
|
||||
// A "(" at the start that isn't a counter, no quote: no segment (it looped forever, LOG.md 2026-10-24 (102)).
|
||||
assert.isNull(scanner.segment(9, '(Some Show) S01E01 x264', 'p', '', '<o@x>', '1', xref, 'alt.binaries.test'))
|
||||
assert.equal(scanner.segment(9, '(Some Show) S01E01.mkv (3/9)', 'p', '', '<o@x>', '1', xref, 'alt.binaries.test')?.number, 3)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user