-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gc:arc - SIGSEGV for rawAlloc on windows #16365
Comments
|
compiling the file with nim c --gc: arc -d: useMalloc -g ut_label.nim and using valgrind to see exactly where the code fails you get this: https://gist.github.com/LucasUllon/a55a8f54b0876ac8466d524085362111 |
that's good but I mean minimizing the source code to get a minimum reproducible example, as is the case for most other issues that are reported in this repo |
Exampleimport
unittest, strutils
proc getShortName(
name: string
): string =
result = name
result.removeSuffix("_something")
proc composeString(
some_string: string
): string =
for i in some_string.items:
result.add ":" & $i
# derived from times, line 1744 (formatPattern):
# result.add h & ":" & m
suite "Dings":
test " .. 1":
discard getShortName(name = "name_something")
test " .. 2":
discard composeString("something")
discard getShortName(name = "name_something") Output
Expected Output... produced by executing
Comments:
|
much better thanks! can't reproduce on osx so maybe it's windows specific
ditto with next steps:
(not on windows, sorry) |
We will run on Linux. If not reproducible we will have to investigate further (as original issue showed up on Linux as well). |
On windows outcome is the same for 1.4.2 (see above), 1.5.1 (most recent) and 1.2.6 |
Example (zero imports)File "a_label.nim":
Output
ObservationsThe code with the following changes as follows and running with
|
Hi @timotheecour , testing the a_label code on Linux I get the same output error, so the error is not only on windows. OUTPUT
|
Almost have a fix ready... |
Great! Works :-) Thanks for your help! Gesegnetes Weihnachtsfest aus Florida in die Heimat! Regards |
Danke, gleichfalls! |
Hi!
This replaces issue #15954.
Example
I execute a_label.nim (see https://gist.github.com/SFR0815/59cf9a9be74fec43be01a46a0f53a47d) and execute using
using
Current Output
Expected Output
... like executing using
nim c -r a_label.nim
...Possible Solution
The text was updated successfully, but these errors were encountered: