Skip to content

Commit

Permalink
these are all VLAs which should be killed when we fix #157
Browse files Browse the repository at this point in the history
  • Loading branch information
antocuni committed Feb 9, 2021
1 parent e2b548a commit 3756927
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions hpy/debug/src/debug_ctx_cpython.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void debug_ctx_CallRealFunctionFromTrampoline(HPyContext dctx,
_HPyFunc_args_VARARGS *a = (_HPyFunc_args_VARARGS*)args;
DHPy dh_self = _py2dh(dctx, a->self);
Py_ssize_t nargs = PyTuple_GET_SIZE(a->args);
DHPy dh_args[nargs * sizeof(DHPy)];
DHPy dh_args[nargs * sizeof(DHPy)]; // VLA, should be killed by #157
for (Py_ssize_t i = 0; i < nargs; i++) {
dh_args[i] = _py2dh(dctx, PyTuple_GET_ITEM(a->args, i));
}
Expand All @@ -83,7 +83,7 @@ void debug_ctx_CallRealFunctionFromTrampoline(HPyContext dctx,
_HPyFunc_args_KEYWORDS *a = (_HPyFunc_args_KEYWORDS*)args;
DHPy dh_self = _py2dh(dctx, a->self);
Py_ssize_t nargs = PyTuple_GET_SIZE(a->args);
DHPy dh_args[nargs * sizeof(DHPy)];
DHPy dh_args[nargs * sizeof(DHPy)]; // VLA, should be killed by #157
for (Py_ssize_t i = 0; i < nargs; i++) {
dh_args[i] = _py2dh(dctx, PyTuple_GET_ITEM(a->args, i));
}
Expand All @@ -101,7 +101,7 @@ void debug_ctx_CallRealFunctionFromTrampoline(HPyContext dctx,
_HPyFunc_args_INITPROC *a = (_HPyFunc_args_INITPROC*)args;
DHPy dh_self = _py2dh(dctx, a->self);
Py_ssize_t nargs = PyTuple_GET_SIZE(a->args);
DHPy dh_args[nargs * sizeof(DHPy)];
DHPy dh_args[nargs * sizeof(DHPy)]; // VLA, should be killed by #157
for (Py_ssize_t i = 0; i < nargs; i++) {
dh_args[i] = _py2dh(dctx, PyTuple_GET_ITEM(a->args, i));
}
Expand Down
6 changes: 3 additions & 3 deletions hpy/universal/src/ctx_meth.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ctx_CallRealFunctionFromTrampoline(HPyContext ctx, HPyFunc_Signature sig,
HPyFunc_varargs f = (HPyFunc_varargs)func;
_HPyFunc_args_VARARGS *a = (_HPyFunc_args_VARARGS*)args;
Py_ssize_t nargs = PyTuple_GET_SIZE(a->args);
HPy h_args[nargs * sizeof(HPy)];
HPy h_args[nargs * sizeof(HPy)]; // VLA, should be killed by #157
for (Py_ssize_t i = 0; i < nargs; i++) {
h_args[i] = _py2h(PyTuple_GET_ITEM(a->args, i));
}
Expand All @@ -34,7 +34,7 @@ ctx_CallRealFunctionFromTrampoline(HPyContext ctx, HPyFunc_Signature sig,
HPyFunc_keywords f = (HPyFunc_keywords)func;
_HPyFunc_args_KEYWORDS *a = (_HPyFunc_args_KEYWORDS*)args;
Py_ssize_t nargs = PyTuple_GET_SIZE(a->args);
HPy h_args[nargs * sizeof(HPy)];
HPy h_args[nargs * sizeof(HPy)]; // VLA, should be killed by #157
for (Py_ssize_t i = 0; i < nargs; i++) {
h_args[i] = _py2h(PyTuple_GET_ITEM(a->args, i));
}
Expand All @@ -45,7 +45,7 @@ ctx_CallRealFunctionFromTrampoline(HPyContext ctx, HPyFunc_Signature sig,
HPyFunc_initproc f = (HPyFunc_initproc)func;
_HPyFunc_args_INITPROC *a = (_HPyFunc_args_INITPROC*)args;
Py_ssize_t nargs = PyTuple_GET_SIZE(a->args);
HPy h_args[nargs * sizeof(HPy)];
HPy h_args[nargs * sizeof(HPy)]; // VLA, should be killed by #157
for (Py_ssize_t i = 0; i < nargs; i++) {
h_args[i] = _py2h(PyTuple_GET_ITEM(a->args, i));
}
Expand Down

0 comments on commit 3756927

Please sign in to comment.