Fix stack overflow when using Probe with FlatIO#5158
Fix stack overflow when using Probe with FlatIO#5158Emin017 wants to merge 1 commit intochipsalliance:mainfrom
Conversation
The issue occurred when stringAccessor called reifySingleTarget, whichtriggered toString on mapped Data elements, creating an infinite loop:stringAccessor → reifySingleTarget → mapping(l) → toString → stringAccessor Added a ThreadLocal guard in Data.stringAccessor to prevent recursivecalls to reifySingleTarget. When recursion is detected, the guard returnsthe current Data object without attempting view reification. Signed-off-by: Qiming Chu <cchuqiming@gmail.com>
jackkoenig
left a comment
There was a problem hiding this comment.
Thank you for circling back on this @Emin017, we need to fix it. I don't think this is quite the right way to do it though--I have an alternative solution in https://github.com/chipsalliance/chisel/tree/jackkoenig/fix-dataview-overflow that I also don't think is quite right, but I will try to get a proper solution soon.
Thanks! I also tried fixing this bug from the |
The issue occurred when
stringAccessorcalledreifySingleTarget, whichtriggered toString on mapped Data elements, creating an infinite loop:stringAccessor → reifySingleTarget → mapping(l) → toString → stringAccessorAdded a ThreadLocal guard in
Data.stringAccessorto prevent recursivecalls toreifySingleTarget. When recursion is detected, the guard returnsthe current Data object without attempting view reification.Fix #4687.
Contributor Checklist
docs/src?Type of Improvement
Desired Merge Strategy
Release Notes
Reviewer Checklist (only modified by reviewer)
3.6.x,5.x, or6.xdepending on impact, API modification or big change:7.0)?Enable auto-merge (squash)and clean up the commit message.Create a merge commit.