Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick a couple of commit from #2621 #2625

Merged
merged 2 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion plugins/python/python_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1778,8 +1778,10 @@ uint64_t uwsgi_python_rpc(void *func, uint8_t argc, char **argv, uint16_t argvs[
PyObject *pyargs = PyTuple_New(argc);
PyObject *ret;

if (!pyargs)
if (!pyargs) {
UWSGI_RELEASE_GIL;
return 0;
}

for (i = 0; i < argc; i++) {
PyTuple_SetItem(pyargs, i, PyString_FromStringAndSize(argv[i], argvs[i]));
Expand Down
6 changes: 4 additions & 2 deletions valgrind/valgrind-generate-sups.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

pydir=${1:-/usr}


gensup() {
for SUP in Cond Free Leak Overlap Addr1 Addr2 Addr4 Addr8 Addr16 Value1 Value2 Value4 Value8 Value16 ; do
Expand All @@ -16,10 +18,10 @@ gensup() {

while read SO ; do
gensup libpython "$SO"
done < <(find /usr/lib*/ -type f -name libpython*)
done < <(find ${pydir}/lib*/ -type f -name libpython*)


while read SO ; do
gensup python "$SO"
done < <(find /usr/lib*/python*/ -type f -name \*.so)
done < <(find ${pydir}/lib*/python*/ -type f -name \*.so)