mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-08 09:30:25 +01:00
While the code looks fine, clang 7 memory sanitizer complains about
things like:
==26052==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f4f4d003327 in weston_config_get_section /home/pq/build/weston-clang/../../git/weston/shared/config-parser.c:141:2
#1 0x7f4f4cfce11a in wet_main /home/pq/build/weston-clang/../../git/weston/compositor/main.c:3266:12
==26683==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f09ebd638e2 in config_section_get_entry /home/pq/build/weston-clang/../../git/weston/shared/config-parser.c:125:2
#1 0x7f09ebd661c4 in weston_config_section_get_bool /home/pq/build/weston-clang/../../git/weston/shared/config-parser.c:310:10
#2 0x7f09ebd2e1e5 in wet_main /home/pq/build/weston-clang/../../git/weston/compositor/main.c:3269:3
In all cases, the errors point to wl_list_for_each().
Making these allocations use zalloc() avoids these errors. Since using
zalloc() is a good habit in any case, I didn't dig deeper.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
|
||
|---|---|---|
| .. | ||
| cairo-util.c | ||
| cairo-util.h | ||
| config-parser.c | ||
| fd-util.h | ||
| file-util.c | ||
| file-util.h | ||
| frame.c | ||
| helpers.h | ||
| image-loader.c | ||
| image-loader.h | ||
| matrix.c | ||
| meson.build | ||
| option-parser.c | ||
| os-compatibility.c | ||
| os-compatibility.h | ||
| platform.h | ||
| string-helpers.h | ||
| timespec-util.h | ||
| weston-egl-ext.h | ||
| xalloc.c | ||
| xalloc.h | ||