Avoid potential negative array index access to cached text.
[LibreOffice.git] / external / python3 / python-3.3.3-disable-obmalloc.patch.0
blobc4a1dea61ecf458ebca9d2cd12b1d246e62bf376
1 --- Objects/obmalloc.c
2 +++ Objects/obmalloc.c
3 @@ -712,8 +712,8 @@
4  
5  #ifdef WITH_PYMALLOC
6  
7 +#define WITH_VALGRIND
8  #ifdef WITH_VALGRIND
9 -#include <valgrind/valgrind.h>
11  /* If we're using GCC, use __builtin_expect() to reduce overhead of
12     the valgrind checks */
13 @@ -1430,7 +1430,7 @@
15  #ifdef WITH_VALGRIND
16      if (UNLIKELY(running_on_valgrind == -1)) {
17 -        running_on_valgrind = RUNNING_ON_VALGRIND;
18 +        running_on_valgrind = 1;
19      }
20      if (UNLIKELY(running_on_valgrind)) {
21          return NULL;