Nim/tests/async
Ștefan Talpalaru a1c82c39af
asyncdispatch+stackTraceOverride: fix premature collection (#18039) [backport:1.2]
Copying StackTraceEntry instances when nimStackTraceOverride is defined
breaks the link between a cstring field that's supposed to point at
another string field in the same object.

Sometimes, the original object is garbage collected, that memory region
reused for storing other strings, so when the StackTraceEntry copy tries
to use its cstring pointer to construct a traceback message, it accesses
unrelated strings.

This only happens for async tracebacks and this patch prevents that by
making sure we only use the string fields when nimStackTraceOverride is
defined.

Async tracebacks also beautified slightly by getting rid of an extra line
that was supposed to be commented out, along with the corresponding debugging output.

There's also a micro-optimisation to avoid concatenating two strings just
to get their combined length.
2021-05-19 19:19:11 +02:00
..
hello.txt fixes #7347, asyncfile.getFileSize (#7354) 2018-03-17 15:21:22 +00:00
t3075.nim Skip nested procedures in .async. macro 2018-09-22 17:30:17 +02:00
t6846.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
t7192.nim lots of small changes 2018-12-11 21:23:22 +01:00
t7758.nim fix #14685 tests/async/t7758.nim flaky (#14721) 2020-06-19 09:53:45 +02:00
t8982.nim complete future only once in or (fixes #8982) (#9632) 2018-11-09 22:45:17 +00:00
t9201.nim asyncmacro: add nnkSym support for getName() (#9204) 2018-10-09 15:53:13 +02:00
t12221.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
t13889.nim Fix #13889 with testcase (#13896) [backport] 2020-04-06 16:25:24 +02:00
t14820.nim Fix asyncdispatch drain behavior (#14820) (#14838) 2020-06-30 15:23:53 +02:00
t15148.nim fix #15148 (#15149) 2020-08-08 07:24:54 +02:00
t15804.nim fixes #15804 (#15820) 2020-11-02 14:17:09 +01:00
tacceptcloserace.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
tasync_forward.nim Async macro fixes (#5739) 2017-05-16 22:09:19 +02:00
tasync_gcsafe.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
tasync_gcunsafe.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
tasync_in_seq_constr.nim Extended tasync_in_seq_constr test 2018-05-09 22:25:27 +03:00
tasync_misc.nim Add test-cases to some fixed issues to close them (#14795) 2020-06-24 20:38:08 -07:00
tasync_noasync.nim fixes #15804 (#15820) 2020-11-02 14:17:09 +01:00
tasync_nofuture.nim Make await a template (#12085) 2020-04-25 20:27:03 +02:00
tasync_traceback.nim asyncdispatch+stackTraceOverride: fix premature collection (#18039) [backport:1.2] 2021-05-19 19:19:11 +02:00
tasyncall.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tasyncawait.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
tasyncclosestall.nim faster CIs (#13803) 2020-03-30 13:18:12 +02:00
tasyncconnect.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
tasyncdial.nim move travis, appveyor, ci.yml.disabled to unmaintained/ (#17828) 2021-04-24 07:54:31 +02:00
tasyncdiscard.nim Removed tests with asyncio. 2016-09-07 12:19:06 +03:00
tasynceagain.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
tasyncexceptions.nim lots of small changes 2018-12-11 21:23:22 +01:00
tasyncfile.nim megatest can be executed 2018-12-11 21:23:21 +01:00
tasyncfilewrite.nim make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
tasyncintemplate.nim simplify asyncfutures, asyncmacro (#17633) 2021-04-14 21:22:22 +02:00
tasyncnetudp.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
tasyncrecursion.nim lots of small changes 2018-12-11 21:23:22 +01:00
tasyncRecvLine.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tasyncsend4757.nim fix #14320 (tasyncawait.nim is recently very flaky) + avoid hardcoding service ports everywhere + flakyAssert (#14327) 2020-05-13 11:05:47 +02:00
tasyncssl.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
tasynctry.nim fixes #14279 (#14618) 2020-06-09 20:39:26 +02:00
tawaitsemantics.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tbreak_must_exec_finally.nim closureiters: fixes #15243 (#15454) [backport:1.2] 2020-10-02 12:38:16 +02:00
tcallbacks.nim keep the order of the callbacks 2018-11-07 15:22:02 +01:00
tdiscardableproc.nim testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
testmanyasyncevents.nim scoped memory management (#14790) 2020-07-04 07:37:24 +02:00
tfuturestream.nim faster CIs (#13803) 2020-03-30 13:18:12 +02:00
tfuturevar.nim fix #9695 asyncmacro: tfuturevar fails when activated [backport: 1.0] (#16090) 2020-11-22 17:16:42 +01:00
tgeneric_async.nim Fix some usages of typedesc in async procs 2018-04-13 13:31:55 +03:00
tgenericasync.nim fixes #4856 2016-10-20 15:20:27 +02:00
tioselectors.nim fix #13166 tioselectors flaky test on freebsd+OSX (#14634) 2020-06-12 21:19:23 -07:00
tioselectors.nim.cfg Forgot about newlines at the end 2016-06-23 23:16:00 +03:00
tjsandnativeasync.nim faster CIs (#13803) 2020-03-30 13:18:12 +02:00
tlambda.nim make more tests green 2018-04-30 02:52:58 +02:00
tmultisync.nim Implements {.multisync.} pragma for async and sync proc combos. 2016-09-18 18:15:20 +02:00
tnestedpfuturetypeparam.nim Fixes async tests. 2014-09-09 01:17:07 +01:00
tnewasyncudp.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
tnimcall_to_closure.nim fixes async regression 2016-01-11 11:11:44 +01:00
tpendingcheck.nim faster CIs (#13803) 2020-03-30 13:18:12 +02:00
tpolltimeouts.nim Fixes #4262. 2016-09-17 13:22:04 +02:00
treturn_await.nim fixes #4371 2016-07-08 10:34:12 +02:00
ttemplateinasync.nim Fix regression w/ templates defined in async proc 2018-10-03 18:25:25 +02:00
tupcoming_async.nim Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
twinasyncrw.nim fix #14320 (tasyncawait.nim is recently very flaky) + avoid hardcoding service ports everywhere + flakyAssert (#14327) 2020-05-13 11:05:47 +02:00