-
-
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
Simple channels with --gc:arc #13936
Comments
On Nim from 2020-04-20, the issue changed, the previous crash was a segfault on createThread Now it is similar to #13935 (comment) but:
|
Still hangs on devel (and SIGSEGVs with |
Works for me on Windows, here is the output:
|
Works for me on Linux with #14722 !
|
@Araq You don't have "Success" in your output, on the current devel my code doesn't segfaults but it gets stuck at the same point. |
Just for curiosity, valgrind (with ~/P/stuff ❯❯❯ valgrind --leak-check=full ./a
==20443== Memcheck, a memory error detector
==20443== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==20443== Using Valgrind-3.16.0.GIT and LibVEX; rerun with -h for copyright info
==20443== Command: ./a
==20443==
Testing if 2 threads can send data
-----------------------------------
Sender sent: 42
Receiver got: 42
Receiver got: 53
Sender sent: 53
Sender sent: 64
Sender sent: 75
Receiver got: 64
Receiver got: 75
Receiver got: 86
Sender sent: 86
Sender sent: 97
Receiver got: 97
Receiver got: 108
Sender sent: 108
Sender sent: 119
Sender sent: 130
Receiver got: 119
Receiver got: 130
Sender sent: 141
Receiver got: 141
-----------------------------------
Success
==20443==
==20443== HEAP SUMMARY:
==20443== in use at exit: 0 bytes in 0 blocks
==20443== total heap usage: 26 allocs, 26 frees, 2,678 bytes allocated
==20443==
==20443== All heap blocks were freed -- no leaks are possible
==20443==
==20443== For lists of detected and suppressed errors, rerun with: -s
==20443== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) |
Yes, it's working now. I think this should be added as a test, we can test that "Success" is printed last (with a timeout as multithreading bugs lead to unresponsive apps from time to time) |
The following is a standalone implementation of Weave channel that can buffer up to one object.
It works with the default GC but crashes with gc:arc
The text was updated successfully, but these errors were encountered: