-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
These bugs were found with FUZZ_SPAN_INVARIANTS from #126. The fuzzing results were summarized by AI.
Bug 1: String token has incorrect span for character reference followed by bogus comment
Input: &<!
Symptom:
- String token has value
&but span1..2pointing to<in the input - Should have span
0..1pointing to the&character
Token sequence:
- Error at
3..3(IncorrectlyOpenedComment) - String
1..2- BUG: span points to wrong content (points to<but value is&) - Comment
1..3
Another similar bug: echo 'asdasd&<!' | cargo run --example tokenize_with_spans
Bug 2: String token emitted out of order with backward span
Input: 0<h 0 0 0
Symptom:
- String token for initial
0character is emitted last, after errors at later positions - Violates span ordering invariant
Token sequence:
- Error
4..5(DuplicateAttribute) - Error
9..9(EofInTag) - String
0..1- BUG: span goes backward from position 5/9 to position 0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working