This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository enlightenment.
View the commit online.
commit 8d7bcff9982130c9ee535038563ea0d2fd2fdc79
Author: [email protected] <[email protected]>
AuthorDate: Fri Mar 13 14:19:01 2026 -0600
chore: add valgrind suppression for glibc SSE2 strncmp false positive
Add a suppression file for a known valgrind false positive that occurs when
libEGL.so is loaded via dlopen() during EGL initialization. The glibc dynamic
linker's decompose_rpath() function strdups short RPATH strings, and the
SSE2-optimized strncmp reads memory in 8-byte aligned chunks, over-reading
the malloc'd buffer by up to 7 bytes. This read is safe at runtime (same
page, no segfault) but valgrind flags it as an invalid memory access.
The suppression file is now installed to the data directory and automatically
passed to valgrind via the --suppressions flag when enlightenment_start is
invoked with the -valgrind option.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
data/valgrind/enlightenment.supp | 41 ++++++++++++++++++++++++++++++++++++++++
data/valgrind/meson.build | 3 +++
meson.build | 1 +
src/bin/e_start_main.c | 13 ++++++++-----
4 files changed, 53 insertions(+), 5 deletions(-)
diff --git a/data/valgrind/enlightenment.supp b/data/valgrind/enlightenment.supp
new file mode 100644
index 000000000..f2e1c584a
--- /dev/null
+++ b/data/valgrind/enlightenment.supp
@@ -0,0 +1,41 @@
+##
+## Valgrind suppressions for known false positives in Enlightenment
+##
+
+##
+## SSE2-optimized strncmp over-read in glibc dynamic linker
+##
+## When libEGL.so is loaded via dlopen() during EGL initialization,
+## decompose_rpath() strdups a short RPATH string (typically ~15 bytes).
+## The SSE2 strncmp in glibc reads memory in 8-byte aligned chunks,
+## reading up to 7 bytes past the end of the malloc'd buffer. The read
+## never crosses a page boundary and never segfaults at runtime, but
+## valgrind's byte-level shadow memory tracking flags it correctly.
+##
+## This is a well-known glibc/valgrind interaction with SIMD string
+## functions. There is nothing to fix in enlightenment or EFL.
+##
+{
+ glibc-dynlinker-strncmp-sse2-is_dst-via-_dl_dst_count
+ Memcheck:Addr8
+ fun:strncmp
+ fun:is_dst
+ fun:_dl_dst_count
+ fun:expand_dynamic_string_token
+ fun:fillin_rpath*
+ fun:decompose_rpath
+ fun:cache_rpath
+ fun:_dl_map_object
+}
+
+{
+ glibc-dynlinker-strncmp-sse2-is_dst-via-_dl_dst_substitute
+ Memcheck:Addr8
+ fun:strncmp
+ fun:is_dst
+ fun:_dl_dst_substitute
+ fun:fillin_rpath*
+ fun:decompose_rpath
+ fun:cache_rpath
+ fun:_dl_map_object
+}
diff --git a/data/valgrind/meson.build b/data/valgrind/meson.build
new file mode 100644
index 000000000..a5cf30d60
--- /dev/null
+++ b/data/valgrind/meson.build
@@ -0,0 +1,3 @@
+install_data([ 'enlightenment.supp' ],
+ install_dir: join_paths(dir_data, 'enlightenment/data/valgrind')
+ )
diff --git a/meson.build b/meson.build
index 8ccdc5e66..b3bf7d21c 100644
--- a/meson.build
+++ b/meson.build
@@ -407,6 +407,7 @@ subdir('data/images')
subdir('data/input_methods')
subdir('data/units')
subdir('data/session')
+subdir('data/valgrind')
subdir('doc')
diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c
index bac03da03..2e7c50ed9 100644
--- a/src/bin/e_start_main.c
+++ b/src/bin/e_start_main.c
@@ -521,7 +521,7 @@ int
main(int argc, char **argv)
{
int i, ret = -1;
- char *buf = NULL, *buf2 = NULL, *buf3 = NULL, **args, *home;
+ char *buf = NULL, *buf2 = NULL, *buf3 = NULL, *buf4 = NULL, **args, *home;
const char *bindir;
Eina_Bool really_know = EINA_FALSE;
struct sigaction action;
@@ -703,7 +703,9 @@ main(int argc, char **argv)
myasprintf(&buf, "%s/enlightenment", eina_prefix_bin_get(pfx));
if (vgd)
{
- args = alloca((argc + 11) * sizeof(char *));
+ myasprintf(&buf4, "--suppressions=%s/data/valgrind/enlightenment.supp",
+ eina_prefix_data_get(pfx));
+ args = alloca((argc + 12) * sizeof(char *));
args[0] = "/usr/bin/valgrind";
args[1] = "--tool=memcheck";
args[2] = "--num-callers=256";
@@ -714,9 +716,10 @@ main(int argc, char **argv)
args[7] = "--track-origins=yes";
args[8] = "--redzone-size=512";
args[9] = "--freelist-vol=100000000";
- args[10] = buf;
- copy_args(&args[11], argv + 1, argc - 1);
- argc += 10;
+ args[10] = buf4;
+ args[11] = buf;
+ copy_args(&args[12], argv + 1, argc - 1);
+ argc += 11;
args[argc] = NULL;
}
else
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.