Author: Wim Lavrijsen <[email protected]>
Branch:
Changeset: r98154:adff192a6c41
Date: 2019-11-23 21:48 -0800
http://bitbucket.org/pypy/pypy/changeset/adff192a6c41/
Log: ensure memory is allocated for exception status output
diff --git a/pypy/module/_cppyy/src/dummy_backend.cxx
b/pypy/module/_cppyy/src/dummy_backend.cxx
--- a/pypy/module/_cppyy/src/dummy_backend.cxx
+++ b/pypy/module/_cppyy/src/dummy_backend.cxx
@@ -903,7 +903,8 @@
/* handling of function argument buffer ----------------------------------- */
void* cppyy_allocate_function_args(int nargs) {
- CPPYY_G__value* args =
(CPPYY_G__value*)malloc(nargs*sizeof(CPPYY_G__value));
+ /* nargs parameters + one unsigned long for exception status output */
+ CPPYY_G__value* args =
(CPPYY_G__value*)malloc(nargs*sizeof(CPPYY_G__value)+sizeof(unsigned long));
for (int i = 0; i < nargs; ++i)
args[i].type = 'l';
return (void*)args;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit