Open stisa opened 4 years ago
May be linked to #11974 ?
More info and possible workaround:
moving writeFloatToBuffer from formatfloat.nim
to strmantle (exporting the other two procs and using from formatfloat import nil
to avoid some ambiguous calls) seems enough to fix this.
I just tested this on Linux and it seems to work without any issues
[pipik] ~/projects/nimtest/bug !dot!
$ LD_LIBRARY_PATH=. nim c -r --hotcodereloading:on logic.nim
Hint: used config file '/home/darth/.choosenim/toolchains/nim-1.6.8/config/nim.cfg' [Conf]
Hint: used config file '/home/darth/.choosenim/toolchains/nim-1.6.8/config/config.nims' [Conf]
.........................................................
Hint: gc: refc; opt: none (DEBUG BUILD, `-d:release` generates faster code)
26696 lines; 0.131s; 25.523MiB peakmem; proj: /home/darth/projects/nimtest/bug/logic.nim; out: /home/darth/projects/nimtest/bug/logic [SuccessX]
Hint: /home/darth/projects/nimtest/bug/logic [Exec]
4.21
12.4
Using latest stable
$ nim -v
Nim Compiler Version 1.6.8 [Linux: amd64]
Compiled at 2022-09-27
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: c9f46ca8c9eeca8b5f68591b1abe14b962f80a4c
active boot switches: -d:release
Maybe the bug is Windows only?
Might be, or it was fixed as a side effect of something else. I'll try it out on my machine and report back
Converting a float to string causes a crash at runtime with
--hotcodereloading:on
.Example
compile and run with:
This will crash with
SIGSEGV: Illegal storage access.
atstrmantle.nim(94) addFloat
Current Output
Expected Output
Additional Information
Compiler version (
nim -v
):Discovered this when working on the hcr branch of jupyternim (here)