From 93a09131825012d140058591708b15637b8214ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 2 Nov 2012 10:38:00 +0100 Subject: [PATCH 1/3] valgrind suppression file generator --- valgrind/README | 9 +++++++++ valgrind/valgrind-generate-sups.sh | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 valgrind/README create mode 100755 valgrind/valgrind-generate-sups.sh diff --git a/valgrind/README b/valgrind/README new file mode 100644 index 00000000..d3f36873 --- /dev/null +++ b/valgrind/README @@ -0,0 +1,9 @@ +valgrind-generate-sups.sh +========================= + +This script can be used to generate valgrind suppression file. +Valgrind will show a lot of python related errors, to filter them out You can: + +./valgrind-generate-sups.sh > valgrind.suppression +valgrind --tool=memcheck --suppressions=valgrind.suppression [ARGS] + diff --git a/valgrind/valgrind-generate-sups.sh b/valgrind/valgrind-generate-sups.sh new file mode 100755 index 00000000..1032aab0 --- /dev/null +++ b/valgrind/valgrind-generate-sups.sh @@ -0,0 +1,25 @@ +#!/bin/bash + + +gensup() { + for SUP in Cond Free Leak Addr4 Addr8 ; do + echo " +{ + Autogenerated $1 suppression + Memcheck:${SUP} + obj:$2 +} +" + done +} + + +while read SO ; do + gensup libpython "$SO" +done < <(find /usr/lib*/ -type f -name libpython*) + + +while read SO ; do + gensup python "$SO" +done < <(find /usr/lib*/python*/ -type f -name \*.so) + From b0829cc2e32c9582141da099b0c21b374813aa7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 2 Nov 2012 10:56:56 +0100 Subject: [PATCH 2/3] more suppressions --- valgrind/valgrind-generate-sups.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valgrind/valgrind-generate-sups.sh b/valgrind/valgrind-generate-sups.sh index 1032aab0..37bfe3f8 100755 --- a/valgrind/valgrind-generate-sups.sh +++ b/valgrind/valgrind-generate-sups.sh @@ -2,7 +2,7 @@ gensup() { - for SUP in Cond Free Leak Addr4 Addr8 ; do + for SUP in Cond Free Leak Overlap Addr1 Addr2 Addr4 Addr8 Addr16 Value1 Value2 Value4 Value8 Value16 ; do echo " { Autogenerated $1 suppression From 46a33b268a073d8a3fa0549a8cf4e721a1eadfa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 2 Nov 2012 11:21:52 +0100 Subject: [PATCH 3/3] set http status on head static request --- core/protocol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/protocol.c b/core/protocol.c index b3a6e7ee..c3298503 100644 --- a/core/protocol.c +++ b/core/protocol.c @@ -1919,6 +1919,7 @@ int uwsgi_real_file_serve(struct wsgi_request *wsgi_req, char *real_filename, si // if it is a HEAD request just skip transfer if (!uwsgi_strncmp(wsgi_req->method, wsgi_req->method_len, "HEAD", 4)) { + wsgi_req->status = 200; return 0; }