Ștefan Talpalaru
94f80f5bcb
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.
(cherry picked from commit a1c82c39af )
2021-05-19 19:53:08 +02:00
Andreas Rumpf
1281d8dfb8
ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] ( #18040 )
...
* ARC: fixes memory leaks with newSeq used in a loop [backport:1.4]
* Update tests/arc/tnewseq_legacy.nim
(cherry picked from commit 53935b8b27 )
2021-05-19 18:20:21 +02:00
Timothee Cour
a63d434180
refs #18011 disable some newly failing tests on cpp windows; refs #17946 increase timeout for tchannels ( #18012 )
...
(cherry picked from commit 2ce592a209 )
2021-05-17 16:03:42 +02:00
Andreas Rumpf
e4d5139de0
fixes #15848 [backport:1.2] ( #17959 )
...
(cherry picked from commit 51f3ef6cb8 )
2021-05-14 13:12:45 +02:00
Yuriy Glukhov
431eb05708
Fixes #16436 ( #16695 )
...
* Fixes #16436
* Comments addressed
(cherry picked from commit 4ae520711d )
2021-04-28 13:50:30 +02:00
Timothee Cour
28b301cbaa
fix #17454 ( #17461 )
...
(cherry picked from commit d78ebe4a0e )
2021-03-29 15:27:09 +02:00
narimiran
05991805fb
change back part of the test
2021-03-24 18:19:42 +01:00
narimiran
82561f31eb
backport json-related part of #17469
2021-03-24 17:48:39 +01:00
Timothee Cour
e5027dc3da
fix #17383 : json.%,to and jsonutils.formJson,toJson now works with uint|uint64 ( #17389 ) [backport:1.2]
...
* fix #17383 : json.%,to and jsonutils.formJson,toJson now works with uint|uint64
* fixup
* fix for js
(cherry picked from commit 895a40d1ac )
2021-03-19 15:49:56 +01:00
Andreas Rumpf
cf1ecee794
fixes #11225 ; generic sandwich problems; [backport:1.2] ( #17255 )
...
* fixes #11225 ; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'
(cherry picked from commit 2f213db7ee )
2021-03-18 14:08:54 +01:00
flywind
e996d98a8a
fix #16384 and #17144 ( #17126 ) [backport]
...
(cherry picked from commit 6391f6e861 )
2021-03-18 14:08:54 +01:00
flywind
5c88067953
fix #17264 [backport:1.4] ( #17266 )
...
* fix #17264
* fix vm
* fix js and add tests
(cherry picked from commit 171b03c386 )
2021-03-18 13:13:51 +01:00
narimiran
2ff517462b
remove tests for stuff not available in 1.4
2021-02-22 13:51:56 +01:00
flywind
bfc0d64825
fix #17118 ( #17119 ) [backport:1.2]
...
* fix js unsigned integer
* Use `std` prefix for standard library modules
* fix #17118
(cherry picked from commit 32bf10126c )
2021-02-22 10:26:14 +01:00
Andreas Rumpf
7705948d52
fixes #17085 [backport:1.2] ( #17101 )
...
(cherry picked from commit 4395a26764 )
2021-02-19 20:33:41 +01:00
Timothee Cour
a154acda85
followup #17001 : improve coverage for tests/openarray/topenarray.nim ( #17006 )
...
* followup #17001 : improve coverage for tests/openarray/topenarray.nim
(cherry picked from commit 21e60b9a97 )
2021-02-18 19:13:10 +01:00
flywind
8f9ea358b6
[JS] Ref #15952 make toOpenArray works better ( #17001 )
...
* ref 15952 toOpenArray works in JS
* fix
(cherry picked from commit 9bd4f503f4 )
2021-02-18 19:13:01 +01:00
narimiran
8d7e1c4649
remove tests for not backported stuff
2021-02-17 22:04:03 +01:00
Andreas Rumpf
87dc838370
fixes #17033 [backport:1.4] ( #17061 )
...
* fixes #17033 [backport:1.4]
* make test robust against stdlib gensym things
* cleanup assertions.nim to make topt_no_cursor easier to get right
(cherry picked from commit f32ffb6ed8 )
2021-02-17 18:38:53 +01:00
Andreas Rumpf
c04214f8cb
don't introduce 'dispose', use '=dispose', fixes #17003 [backport:1.4] ( #17062 )
...
(cherry picked from commit e463a67c74 )
2021-02-17 18:36:39 +01:00
hlaaftana
c55506006f
[backport:1.4] JS cstring null fixes ( #16979 )
...
* [backport:1.4] JS cstring null fixes
* fix JS move string
* make it look cleaner
(cherry picked from commit 81533a0014 )
2021-02-17 18:36:05 +01:00
narimiran
94560a9faa
remove 'tsugar'
2021-02-09 17:32:38 +01:00
hlaaftana
5f46474555
fix #16967 [backport:1.2] ( #16976 )
...
* fix #16967 [backport:1.2]
* move test to tsugar
(cherry picked from commit 49ee2f7f3b )
2021-02-09 15:39:39 +01:00
hlaaftana
bf06fb7053
Remove declPragmas from lambdas [backport:1.0] ( #16966 )
...
* Remove declPragmas from lambdas [backport:1.0]
* add test for exportc
* fix test
* fix align, nodecl -> noinit
(cherry picked from commit 49b64e8dc7 )
2021-02-09 15:37:12 +01:00
Andreas Rumpf
c7d090c418
basic cleanups regarding SSL handling ( #16940 ) [backport:1.0]
...
* basic cleanups regarding SSL handling
* enabled certificate checking on Windows
* updated the SSL test
* quoting helps
(cherry picked from commit abac35e743 )
2021-02-08 17:08:10 +01:00
hlaaftana
3c74ec0a0f
add finally as post expr block [backport:1.4] ( #16896 )
...
(cherry picked from commit def1f99289 )
2021-02-02 10:10:18 +01:00
narimiran
5e49d3b68a
Revert "make --gc:arc --exceptions:quirky work again [backport:1.4] ( #16583 )"
...
This reverts commit 822c7acd3c .
2021-02-02 09:45:54 +01:00
Timothee Cour
5e5803f28f
typetraits: make genericHead docs reflect reality; use runnableExamples ( #16776 ) [backport:1.4]
...
(cherry picked from commit 8f1f0bd1da )
2021-02-01 15:19:07 +01:00
flywind
d9e14414a4
fix #16706 ( #16717 ) [backport:1.4]
...
(cherry picked from commit ef9027c290 )
2021-02-01 15:18:48 +01:00
Timothee Cour
c346c0b91b
[backport 1.0] add backend support for js bigint ( #16606 )
...
* add backend support for js bigint
* cleanup
* add tests
* add -d:nimHasJsBigIntBackend
* cleanup
* more tests
(cherry picked from commit 025ca660f7 )
2021-02-01 15:18:27 +01:00
Andreas Rumpf
822c7acd3c
make --gc:arc --exceptions:quirky work again [backport:1.4] ( #16583 )
...
* make --gc:arc --exceptions:quirky work again [backport:1.4]
* fixes #16404 [backport:1.4]
(cherry picked from commit 6317e4004d )
2021-02-01 15:16:50 +01:00
cooldome
71bbbdbf96
fix #15043 ( #16441 ) [backport:1.4]
...
* fix #15043
* Trigger build
(cherry picked from commit fbc8a40c7a )
2021-02-01 15:11:37 +01:00
Timothee Cour
1d8b7aa07c
[backport => 1.0] fix #16428 vmops now works for generic procs ( #16429 )
...
* fix #16428 vmops now works for generic procs
* remove duplication
(cherry picked from commit bc84d9c8cb )
2020-12-27 14:45:54 +01:00
Andreas Rumpf
db5ce7ed48
asynchttpserver cleanups [backport:1.0] ( #15966 )
...
* asynchttpserver cleanups [backport:1.0]
(cherry picked from commit 122f22d163 )
2020-12-27 14:19:08 +01:00
Andreas Rumpf
c9d7c67acb
fixes #16365 [backport] ( #16381 )
...
(cherry picked from commit 868c31e88a )
2020-12-19 14:10:54 +01:00
flywind
204369845a
add testcase ( #16156 )
...
(cherry picked from commit 3510216c8a )
2020-11-27 17:51:27 +01:00
Andreas Rumpf
498ac30f9a
updated repr tests ( #16147 )
...
(cherry picked from commit 4fdaded227 )
2020-11-27 17:47:17 +01:00
Andreas Rumpf
2d63592619
fixes https://github.com/status-im/nimbus-eth2/issues/1549 ( #16146 )
...
* fixes https://github.com/status-im/nimbus-eth2/issues/1549 [backport:1.4]
* test fixup
(cherry picked from commit cf516713d0 )
2020-11-27 17:46:30 +01:00
cooldome
160436c8b3
fix #16120 ( #16145 )
...
(cherry picked from commit 8c12d3e29d )
2020-11-26 17:14:43 +01:00
Andreas Rumpf
72f4a0d3e9
fixes #15076 ( #16143 )
...
* fixes #15076
* heapqueue: optimized for ARC
* added another test case [backport:1.4]
* code cleanup
(cherry picked from commit da753c6a2e )
2020-11-26 14:17:30 +01:00
flywind
cf30401f02
move tests under the compiler directory to testament ( #16096 )
...
(cherry picked from commit 57bd64582c )
2020-11-25 12:46:02 +01:00
flywind
cfb38c2383
move tests to testament ( #16101 )
...
* move tests to testament
* minor
* fix random
* disable test random
(cherry picked from commit cbc793b30b )
2020-11-25 12:42:51 +01:00
Andreas Rumpf
99032ca07b
fixes #16069 ; [backport:1.2] [backport:1.4] ( #16115 )
...
* fixes #16069 ; refs https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] [backport:1.4]
* make tests green again
(cherry picked from commit d306a04466 )
2020-11-24 16:18:18 +01:00
cooldome
e2f1fab458
fix #16110 ( #16117 )
...
(cherry picked from commit 1d14b2c9e6 )
2020-11-24 16:12:27 +01:00
flywind
47ebaa4200
typeinfo minor improvement ( #16083 )
...
* typeinfo minor improvement
* minor
* Update lib/core/typeinfo.nim
* rename typeinfo
(cherry picked from commit e4d0f9f3de )
2020-11-24 16:08:24 +01:00
kemifl
4b27458cfc
fix #14056 ( #16071 )
...
fix #14056 , incorporate review comments
(cherry picked from commit a764a5b9bc )
2020-11-24 16:08:08 +01:00
flywind
1eda325177
fix ropes format errors ( #16106 ) [backport:1.0]
...
* fix rope index
* add testcase
* fix ropes format
(cherry picked from commit 0c6c4be0e7 )
2020-11-24 16:06:57 +01:00
flywind
74fa24ce45
fix rope index ( #16100 )
...
* fix rope index
* add testcase
(cherry picked from commit ab2c082cb3 )
2020-11-23 15:23:53 +01:00
flywind
e6ea779b06
fix #9695 asyncmacro: tfuturevar fails when activated [backport: 1.0] ( #16090 )
...
* fix asyncmacro
* Apply suggestions from code review
* Update lib/pure/asyncmacro.nim
(cherry picked from commit 6f1a72069a )
2020-11-23 15:22:35 +01:00
flywind
cb138fc304
sets minor improvement ( #16087 )
...
(cherry picked from commit f1764aaa9e )
2020-11-23 15:22:22 +01:00