eclipse-xtext / eclipse-xtext/xtext
[generator][trace] LeafIterator cannot handle zero length TraceRegions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
using xtext 2.8.4
the LeafIterator.computeNext() method may run into a infinite loop if there is a trace region with length zero.
if current.offset == expectedOffset it will return firstLeafOfCurrent will be returned.
this does not advance expectedOffset since the length is zero.
i assume the zero length based regions should be filtered out before (or never been created) or the iterator should be able to handle them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LeafIterator.computeNext() and trace-region handling in the generator trace subsystem. Reproduce the infinite loop using a TraceRegion with zero length, then determine whether such regions should be filtered before iteration or handled by the iterator. Done means zero-length regions no longer cause non-termination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100