File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include "test_private.h"
10
10
#include "test_expmem.h"
11
- #if !defined(__KERNEL__ ) && defined(HAVE_VALGRIND_VALGRIND_H )
11
+ #ifndef __KERNEL__
12
+ #include <stdlib.h>
13
+ #ifdef HAVE_VALGRIND_VALGRIND_H
12
14
#include <valgrind/valgrind.h>
13
15
#endif
16
+ #endif
14
17
15
18
#define LEN (128)
16
19
@@ -127,12 +130,15 @@ int test_memccpy_s(void) {
127
130
CHECK_SLACK (str1 , nlen );
128
131
#if !defined(__KERNEL__ ) && defined(HAVE_MEMCCPY ) && \
129
132
(defined(__GLIBC__ ) || defined(_WIN32 ))
133
+ /* Ignore on smoker under valgrind */
134
+ if (!(getenv ("TRAVIS" ) && getenv ("VG" )))
135
+ {
130
136
#if defined(HAVE_VALGRIND_VALGRIND_H ) && \
131
137
(__VALGRIND_MAJOR__ > 3 || \
132
138
(__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 13 ))
133
- if (!RUNNING_ON_VALGRIND )
139
+ if (!RUNNING_ON_VALGRIND )
134
140
#endif
135
- {
141
+ {
136
142
/* with glibc/windows overlap allowed, &str[1] returned.
137
143
* an darwin/bsd fails the __memccpy_chk().
138
144
* fails also since valgrind 3.13, 3.12 was ok.
@@ -141,6 +147,7 @@ int test_memccpy_s(void) {
141
147
char * sub = (char * )memccpy (str1 , str1 , 0 , nlen );
142
148
GCC_POP_WARN_RESTRICT
143
149
printf ("memccpy overlap: %p <=> %p\n" , (void * )sub , (void * )str1 );
150
+ }
144
151
}
145
152
#endif
146
153
You can’t perform that action at this time.
0 commit comments