aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulano <nulano@nulano.eu>2020-07-13 18:22:48 +0200
committernulano <nulano@nulano.eu>2020-07-13 18:22:48 +0200
commit7a3c11169e5d4dccb9452eb7ea5190aae1fd3320 (patch)
tree62f3bf3dabb41b3599bc68ebf02e47ad6376f767 /rpython/translator/c
parentdirty fix for windows running rpython/translator/c/test/test_standalone::Test... (diff)
downloadpypy-7a3c11169e5d4dccb9452eb7ea5190aae1fd3320.tar.gz
pypy-7a3c11169e5d4dccb9452eb7ea5190aae1fd3320.tar.bz2
pypy-7a3c11169e5d4dccb9452eb7ea5190aae1fd3320.zip
fix heap corruption when allocating short strings (rpython/translator/c/test/test_standalone::TestStandalone)
Diffstat (limited to 'rpython/translator/c')
-rw-r--r--rpython/translator/c/node.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpython/translator/c/node.py b/rpython/translator/c/node.py
index 993023b8d4..91458b643c 100644
--- a/rpython/translator/c/node.py
+++ b/rpython/translator/c/node.py
@@ -255,7 +255,7 @@ class ArrayDefNode(NodeWithDependencies):
for fname, typename in self.gcfields:
yield '\t' + cdecl(typename, fname) + ';'
if not self.ARRAY._hints.get('nolength', False):
- yield '\tlong length;'
+ yield '\tSigned length;'
varlength = self.varlength
if varlength is not None:
varlength += self.ARRAY._hints.get('extra_item_after_alloc', 0)