diff --git a/config.nims b/config.nims index 6d497c4..bdb35a0 100644 --- a/config.nims +++ b/config.nims @@ -3,6 +3,7 @@ --define:nimStrictDelete --define:ssl --define:threadsafe +--define:useMalloc --hints:on --mm:orc --multimethods:on diff --git a/testresults.html b/testresults.html index b54980e..d047577 100644 --- a/testresults.html +++ b/testresults.html @@ -126,9 +126,9 @@

Testament Test Results Nim Tester

Hostname
spaceship
Git Commit
-
62df3610e8a
+
3e23d8b350d
Branch ref.
-
manifest
+
bug/valgrind-fails-on-asyncdispatch-and-threadpool-import
All Tests
@@ -139,7 +139,7 @@

Testament Test Results Nim Tester

Successful Tests
- 2 (100.00%) + 0 (0.00%)
Skipped Tests
@@ -149,7 +149,7 @@

Testament Test Results Nim Tester

Failed Tests
- 0 (0.00%) + 2 (100.00%)
@@ -201,64 +201,201 @@

Testament Test Results Nim Tester

-
+
-
+
Name
-
tests/boat/tmain.nim c
+
tests/boat/tmain.nim c
Category
boat
Timestamp
unknown
Nim Action
-
run
+
run
Nim Backend Target
c
Code
-
reSuccess
+
reExitcodesDiffer
-

No output details

+
+ + + + + + + + + + + + + +
ExpectedActual
exitcode: 0
exitcode: 1
+
+Output:
+==410286== Memcheck, a memory error detector
+==410286== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==410286== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
+==410286== Command: tests/boat/tmain
+==410286== 
+All HANDS! cat o'nine tails! blue peter! OMG... landlubber
+==410286== 
+==410286== HEAP SUMMARY:
+==410286==     in use at exit: 198,513 bytes in 33 blocks
+==410286==   total heap usage: 3,184 allocs, 3,151 frees, 314,043 bytes allocated
+==410286== 
+==410286== 0 bytes in 1 blocks are definitely lost in loss record 1 of 10
+==410286==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
+==410286==    by 0x4005A22: malloc (rtld-malloc.h:56)
+==410286==    by 0x4005A22: _dl_find_object_update (dl-find_object.c:791)
+==410286==    by 0x400ECCF: dl_open_worker_begin (dl-open.c:735)
+==410286==    by 0x49E2C27: _dl_catch_exception (dl-error-skeleton.c:208)
+==410286==    by 0x400DF99: dl_open_worker (dl-open.c:782)
+==410286==    by 0x49E2C27: _dl_catch_exception (dl-error-skeleton.c:208)
+==410286==    by 0x400E34D: _dl_open (dl-open.c:883)
+==410286==    by 0x48FE6BB: dlopen_doit (dlopen.c:56)
+==410286==    by 0x49E2C27: _dl_catch_exception (dl-error-skeleton.c:208)
+==410286==    by 0x49E2CF2: _dl_catch_error (dl-error-skeleton.c:227)
+==410286==    by 0x48FE1AD: _dlerror_run (dlerror.c:138)
+==410286==    by 0x48FE747: dlopen_implementation (dlopen.c:71)
+==410286==    by 0x48FE747: dlopen@@GLIBC_2.34 (dlopen.c:81)
+==410286== 
+==410286== 3,264 bytes in 12 blocks are possibly lost in loss record 9 of 10
+==410286==    at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
+==410286==    by 0x40147D9: calloc (rtld-malloc.h:44)
+==410286==    by 0x40147D9: allocate_dtv (dl-tls.c:375)
+==410286==    by 0x40147D9: _dl_allocate_tls (dl-tls.c:634)
+==410286==    by 0x4903834: allocate_stack (allocatestack.c:430)
+==410286==    by 0x4903834: pthread_create@@GLIBC_2.34 (pthread_create.c:647)
+==410286==    by 0x11422E: createThread__pureZconcurrencyZthreadpool_489 (in /home/poop/git/private/nirv/boat/tests/boat/tmain)
+==410286==    by 0x1199D9: atmdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot12atslibatspureatsconcurrencyatsthreadpooldotnim_Init000 (in /home/poop/git/private/nirv/boat/tests/boat/tmain)
+==410286==    by 0x10A5A0: main (in /home/poop/git/private/nirv/boat/tests/boat/tmain)
+==410286== 
+==410286== LEAK SUMMARY:
+==410286==    definitely lost: 0 bytes in 1 blocks
+==410286==    indirectly lost: 0 bytes in 0 blocks
+==410286==      possibly lost: 3,264 bytes in 12 blocks
+==410286==    still reachable: 195,249 bytes in 20 blocks
+==410286==         suppressed: 0 bytes in 0 blocks
+==410286== Reachable blocks (those to which a pointer was found) are not shown.
+==410286== To see them, rerun with: --leak-check=full --show-leak-kinds=all
+==410286== 
+==410286== For lists of detected and suppressed errors, rerun with: -s
+==410286== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
+
-
+
-
+
Name
-
tests/config/tconfig.nim c
+
tests/config/tconfig.nim c
Category
config
Timestamp
unknown
Nim Action
-
run
+
run
Nim Backend Target
c
Code
-
reSuccess
+
reExitcodesDiffer
-

No output details

+
+ + + + + + + + + + + + + +
ExpectedActual
exitcode: 0
exitcode: 1
+
+Output:
+==410292== Memcheck, a memory error detector
+==410292== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==410292== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
+==410292== Command: tests/config/tconfig
+==410292== 
+ref Exception(parent: nil, name: "OSError", msg: "No such file or directory\n
+Additional info: 192.168.1.1", trace: @[StackTraceEntry(procname: "raiseOSError", line: 95, filename: "oserr.nim", frameMsg: "")], up: nil)
+ref Exception(parent: nil, name: "OSError", msg: "No such file or directory\n
+Additional info: http://www.not.https", trace: @[StackTraceEntry(procname: "raiseOSError", line: 95, filename: "oserr.nim", frameMsg: "")], up: ref Exception(parent: nil, name: "OSError", msg: "No such file or directory\n
+Additional info: 192.168.1.1", trace: @[StackTraceEntry(procname: "raiseOSError", line: 95, filename: "oserr.nim", frameMsg: "")], up: nil))
+==410292== 
+==410292== HEAP SUMMARY:
+==410292==     in use at exit: 215,387 bytes in 40 blocks
+==410292==   total heap usage: 3,609 allocs, 3,569 frees, 398,536 bytes allocated
+==410292== 
+==410292== 0 bytes in 1 blocks are definitely lost in loss record 1 of 14
+==410292==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
+==410292==    by 0x4005A22: malloc (rtld-malloc.h:56)
+==410292==    by 0x4005A22: _dl_find_object_update (dl-find_object.c:791)
+==410292==    by 0x400ECCF: dl_open_worker_begin (dl-open.c:735)
+==410292==    by 0x49E2C27: _dl_catch_exception (dl-error-skeleton.c:208)
+==410292==    by 0x400DF99: dl_open_worker (dl-open.c:782)
+==410292==    by 0x49E2C27: _dl_catch_exception (dl-error-skeleton.c:208)
+==410292==    by 0x400E34D: _dl_open (dl-open.c:883)
+==410292==    by 0x48FE6BB: dlopen_doit (dlopen.c:56)
+==410292==    by 0x49E2C27: _dl_catch_exception (dl-error-skeleton.c:208)
+==410292==    by 0x49E2CF2: _dl_catch_error (dl-error-skeleton.c:227)
+==410292==    by 0x48FE1AD: _dlerror_run (dlerror.c:138)
+==410292==    by 0x48FE747: dlopen_implementation (dlopen.c:71)
+==410292==    by 0x48FE747: dlopen@@GLIBC_2.34 (dlopen.c:81)
+==410292== 
+==410292== 3,264 bytes in 12 blocks are possibly lost in loss record 12 of 14
+==410292==    at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
+==410292==    by 0x40147D9: calloc (rtld-malloc.h:44)
+==410292==    by 0x40147D9: allocate_dtv (dl-tls.c:375)
+==410292==    by 0x40147D9: _dl_allocate_tls (dl-tls.c:634)
+==410292==    by 0x4903834: allocate_stack (allocatestack.c:430)
+==410292==    by 0x4903834: pthread_create@@GLIBC_2.34 (pthread_create.c:647)
+==410292==    by 0x11633E: createThread__pureZconcurrencyZthreadpool_489 (in /home/poop/git/private/nirv/boat/tests/config/tconfig)
+==410292==    by 0x127249: atmdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot12atslibatspureatsconcurrencyatsthreadpooldotnim_Init000 (in /home/poop/git/private/nirv/boat/tests/config/tconfig)
+==410292==    by 0x12831C: PreMain (in /home/poop/git/private/nirv/boat/tests/config/tconfig)
+==410292==    by 0x10A7E0: main (in /home/poop/git/private/nirv/boat/tests/config/tconfig)
+==410292== 
+==410292== LEAK SUMMARY:
+==410292==    definitely lost: 0 bytes in 1 blocks
+==410292==    indirectly lost: 0 bytes in 0 blocks
+==410292==      possibly lost: 3,264 bytes in 12 blocks
+==410292==    still reachable: 212,123 bytes in 27 blocks
+==410292==         suppressed: 0 bytes in 0 blocks
+==410292== Reachable blocks (those to which a pointer was found) are not shown.
+==410292== To see them, rerun with: --leak-check=full --show-leak-kinds=all
+==410292== 
+==410292== For lists of detected and suppressed errors, rerun with: -s
+==410292== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
+
@@ -267,7 +404,7 @@

config<

Report generated by: testament – Nim Tester
- Made with Nim. Generated on: 2023-03-15 10:24:16 UTC-07:00 + Made with Nim. Generated on: 2023-03-15 14:41:59 UTC-07:00

diff --git a/tests/boat/tmain.nim b/tests/boat/tmain.nim index 5aba417..1f79ae3 100644 --- a/tests/boat/tmain.nim +++ b/tests/boat/tmain.nim @@ -1,9 +1,10 @@ discard """ action: "run" +cmd: "nim $target --hints:on -d:testing --mm:orc -d:useMalloc --nimblePath:build/deps/pkgs $options $file" output: ''' All HANDS! cat o'nine tails! blue peter! OMG... landlubber ''' -valgrind: "leaks" +valgrind: "true" """ import boat diff --git a/tests/config.nims b/tests/config.nims index 310c9f3..4ae9604 100644 --- a/tests/config.nims +++ b/tests/config.nims @@ -8,6 +8,8 @@ --define:nimPreviewJsonutilsHoleyEnum --define:nimUnittestColor:off --define:nimUnittestOutputLevel:PRINT_FAILURES +--define:useMalloc # required for valgrind --excessiveStackTrace:off +--mm:orc # required for valgrind --path:"$projectDir/../../src" --processing:off diff --git a/tests/config/tconfig.nim b/tests/config/tconfig.nim index b6cce5f..09768f1 100644 --- a/tests/config/tconfig.nim +++ b/tests/config/tconfig.nim @@ -1,7 +1,8 @@ discard """ action: "run" -valgrind: "leaks" +cmd: "nim $target --hints:on -d:testing --mm:orc -d:useMalloc --nimblePath:build/deps/pkgs $options $file" exitcode: 0 +valgrind: true """ import ../../bdd