akkadotnet / akkadotnet/Hyperion
Stack overflow exceptions
- Dominant language
- C#
- Stars
- 281
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
While working on NBench tests I've seen few places, where objects serialization ends up with stack overflow, namely:
- [ ] Circular references.
- [x] `LinkedList<>` serialization/deserialization. This will be tricky as invalid behavior is visible only when nbench tests will be compiled and run under Release configuration. On Debug it's working fine. (**Edit: fixed by** #6 ).
- [x] Test using `Dictionary` (upon deserialization value 'z' was deserialized to '\0' instead, the track of a bug followed back to IlCompiler) (**Edit: fixed by** #4 ).
Setting serializer to use `preserveObjectReferences` option haven't changed anything there.
Regarding `LinkedList<>` probably the best option will be to implement custom serializer - conceptually this data structure is simple, but internal implementation (used by the serializer) is complex an may cause problems.
Contributor guide
Research direction
Start by reproducing the remaining circular-reference case in the NBench serialization tests; the issue does not name a specific file or entry point. The earlier LinkedList and Dictionary cases are marked fixed, so done means preventing stack overflow during circular-reference serialization and adding or updating a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100