Skip to content

Commit 767f1a9

Browse files
committed
add valgrind exception for false positive when memmove is an ifunc resolving to memcpy
1 parent be4b072 commit 767f1a9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/sentry_os.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ sentry__get_os_context(void)
196196
#elif defined(SENTRY_PLATFORM_UNIX)
197197

198198
# include <fcntl.h>
199-
# include <string.h>
200199
# include <sys/utsname.h>
201-
# include <unistd.h>
202200

203201
# define OS_RELEASE_MAX_LINE_SIZE 128
204202
# define OS_RELEASE_MAX_KEY_SIZE 64

tests/valgrind.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@
2727
...
2828
fun:sentry__procmaps_read_ids_from_elf
2929
}
30+
{
31+
memmove is safe to overlap even if it is an ifunc that resolves to memcpy
32+
Memcheck:Overlap
33+
fun:__memcpy_chk
34+
fun:memmove
35+
}

0 commit comments

Comments
 (0)