summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-08-13 06:37:37 +0200
committerGitHub <noreply@github.com>2019-08-13 06:37:37 +0200
commit433613e2675064583ee5055d47aa89a43184e7f2 (patch)
tree5bf9c7abfc77ab2661a5fec98201dce06da9ea12
parent322ce1872fd13e7b3029db800727ecdc886ad8a3 (diff)
downloadNim-433613e2675064583ee5055d47aa89a43184e7f2.tar.gz
fixes #11844 (#11935)
-rw-r--r--lib/core/allocators.nim8
-rw-r--r--tests/destructor/tnewruntime_misc.nim2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/core/allocators.nim b/lib/core/allocators.nim
index 962a99fd6..259319ca2 100644
--- a/lib/core/allocators.nim
+++ b/lib/core/allocators.nim
@@ -13,10 +13,10 @@ type
     ZerosMem    ## the allocator always zeros the memory on an allocation
   Allocator* = ptr AllocatorObj
   AllocatorObj* {.inheritable, compilerproc.} = object
-    alloc*: proc (a: Allocator; size: int; alignment: int = 8): pointer {.nimcall, raises: [], tags: [].}
-    dealloc*: proc (a: Allocator; p: pointer; size: int) {.nimcall, raises: [], tags: [].}
-    realloc*: proc (a: Allocator; p: pointer; oldSize, newSize: int): pointer {.nimcall, raises: [], tags: [].}
-    deallocAll*: proc (a: Allocator) {.nimcall, raises: [], tags: [].}
+    alloc*: proc (a: Allocator; size: int; alignment: int = 8): pointer {.nimcall, raises: [], tags: [], gcsafe.}
+    dealloc*: proc (a: Allocator; p: pointer; size: int) {.nimcall, raises: [], tags: [], gcsafe.}
+    realloc*: proc (a: Allocator; p: pointer; oldSize, newSize: int): pointer {.nimcall, raises: [], tags: [], gcsafe.}
+    deallocAll*: proc (a: Allocator) {.nimcall, raises: [], tags: [], gcsafe.}
     flags*: set[AllocatorFlag]
     name*: cstring
     allocCount: int
diff --git a/tests/destructor/tnewruntime_misc.nim b/tests/destructor/tnewruntime_misc.nim
index 0e9541e2e..c5f978a98 100644
--- a/tests/destructor/tnewruntime_misc.nim
+++ b/tests/destructor/tnewruntime_misc.nim
@@ -1,5 +1,5 @@
 discard """
-  cmd: '''nim cpp --newruntime $file'''
+  cmd: '''nim cpp --newruntime --threads:on $file'''
   output: '''(field: "value")
 Indeed
 axc
e0cfec4213587'>ce2c1efc ^
e0610e39 ^
ac07e589 ^


ce2c1efc ^
5a2cb154 ^















ce2c1efc ^
5a2cb154 ^















c8a3ccbe ^
5a2cb154 ^
c56d803c ^
5a2cb154 ^
104e521c ^
14a38052 ^


d1c9392a ^
e99038ea ^
14a38052 ^





ac07e589 ^
14a38052 ^
ac07e589 ^
14a38052 ^





901ae474 ^
14a38052 ^

ac07e589 ^
14a38052 ^
33e7c3a7 ^



ac07e589 ^

9309600c ^
ac07e589 ^
33e7c3a7 ^





ac07e589 ^
33e7c3a7 ^
ac07e589 ^
33e7c3a7 ^





ac07e589 ^
33e7c3a7 ^


ac07e589 ^
33e7c3a7 ^
ac07e589 ^
33e7c3a7 ^

e0ffdcd1 ^
33e7c3a7 ^

ac07e589 ^
33e7c3a7 ^
ac07e589 ^
33e7c3a7 ^
e0ffdcd1 ^
33e7c3a7 ^





ac07e589 ^
33e7c3a7 ^

14a38052 ^
33e7c3a7 ^

e0ffdcd1 ^

901ae474 ^
e0ffdcd1 ^
e99038ea ^
e0ffdcd1 ^



901ae474 ^
e99038ea ^
e0ffdcd1 ^

5a2cb154 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156