akkadotnet / akkadotnet/Hyperion

Stack overflow exceptions

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.