You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When decoding an object on orc it segfaults when echoing the object. It works for refc but not on orc (tested on 1.6.10 and devel). Reproducing code:
import toml_serialization
typeNbConfig*=object
srcDir*, homeDir*: stringlet f =readFile("nimib.toml")
let t =Toml.decode(f, NbConfig, "nimib")
echo t # error here
Thank you for reporting this, this is actually a severe bug[s] in Nim when orc enabled. Somehow var param stop working after certain depth of indirect recursion.
This bug have not reported to Nim dev team because it is very hard to isolate and reproduce outside nim-serialization framework. But because it has appear consistently in several nim-serialization derived libraries, I think it's time to look deeper into this.
For the time being, you can stick with refc that what we also doing because orc breaks a lot of our libraries.
jangko
added a commit
to status-im/nim-serialization
that referenced
this issue
Apr 14, 2023
When decoding an object on
orc
it segfaults when echoing the object. It works forrefc
but not onorc
(tested on 1.6.10 and devel). Reproducing code:nimib.toml
:Output:
Expected output:
The text was updated successfully, but these errors were encountered: