On Fri, 31 May 2024 13:03:58 +0200 Eric Degenetais <eric.4.deb...@grabatoulnz.fr> wrote:
> valgrind gitg & [... zillions of error reports ...] ==103518== Conditional jump or move depends on uninitialised value(s) ==103518== at 0xD95C49B: ??? ==103518== by 0x2108005F: ??? ==103518== ==103518==
Architecture: amd64 (x86_64)
Hello, I am not maintainer of gitk, just tried to reproduce this and was able to within a minimal amd64 qemu VM. There I received a similar valgrind output. When digging deeper and having the related dbgsym packages installed the backtrace ends in something like this: (gdb) bt #0 0x0000000013dd23c8 in ?? () ... #18 0x000000000dfb2890 in ?? () #19 0x0000000006742280 in jit_machine_stack_exec () at src/pcre2_jit_match.c:57 #20 0x0000000006776894 in pcre2_jit_match_8 () at src/pcre2_jit_match.c:168 #21 0x00000000055f1edc in g_match_info_next () at ../../../glib/gregex.c:1119 ... Searching the internet for pcre2 and valgrind leads to this discussion [2]. There is the existence of the pcre2 configure parameter "--enable-valgrind" mentioned. A local built package libpcre2-8-0, with this switch enabled, makes the valgrind reports to go away. Therefore this reports might be just false positives due to pcre2's JIT using SIMD instructions. [2] https://www.mail-archive.com/pcre-dev@exim.org/msg06407.html Kind regards, Bernhard
# Trixie/testing amd64 qemu VM 2024-06-17 apt update apt dist-upgrade apt install xserver-xorg slim jwm weston xterm tmux mc fakeroot pkg-config valgrind gitg apt install gitg-dbgsym libpixman-1-0-dbgsym libgtksourceview-4-0-dbgsym libglib2.0-0t64-dbgsym libgit2-glib-1.0-0-dbgsym libpcre2-8-0-dbgsym libgit2-1.7-dbgsym valgrind-dbgsym apt install --no-install-recommends gdm3 apt build-dep pcre2 mkdir /home/benutzer/source/pcre2/orig -p cd /home/benutzer/source/pcre2/orig apt source pcre2 cd git clone https://salsa.debian.org/gnome-team/gitg.git cd gitg export DISPLAY=:0 valgrind gitg script -c "valgrind gitg" -a "$HOME/valgrind-gitg_$(date +%Y-%m-%d_%H-%M-%S).log" ... ==5810== Conditional jump or move depends on uninitialised value(s) ==5810== at 0x13DD03C8: ??? ==5810== by 0xD1DA52F: ??? ==5810== ... script -c "valgrind --vgdb=yes --vgdb-error=0 gitg" -a "$HOME/valgrind-gitg-gdb_$(date +%Y-%m-%d_%H-%M-%S).log" script -c "gdb -q gitg" -a "$HOME/valgrind-gitg-gdb-gitg_$(date +%Y-%m-%d_%H-%M-%S).log" target remote | /usr/bin/vgdb --pid=5907 cont ==5907== Conditional jump or move depends on uninitialised value(s) ==5907== at 0x13DD13C8: ??? ==5907== by 0xDC694FF: ??? ==5907== ==5907== (action on error) vgdb me ... Thread 1 received signal SIGTRAP, Trace/breakpoint trap. 0x0000000013dd13c8 in ?? () (gdb) bt #0 0x0000000013dd13c8 in ?? () #1 0x0000001ffeff6f70 in ?? () #2 0x0000000008a717e8 in ?? () from /lib/x86_64-linux-gnu/libpixman-1.so.0 #3 0x000000000dc694ff in ?? () #4 0x0000000000000000 in ?? () . benutzer@debian:~$ script -c "gdb -q gitg" -a "$HOME/valgrind-gitg-gdb-gitg_$(date +%Y-%m-%d_%H-%M-%S).log" Script started, output log file is '/home/benutzer/valgrind-gitg-gdb-gitg_2024-06-18_00-22-58.log'. Reading symbols from gitg... Reading symbols from /usr/lib/debug/.build-id/32/1b946cae9d0f8c7485c341a43a3d15bf4d3032.debug... (gdb) target remote | /usr/bin/vgdb --pid=6547 Remote debugging using | /usr/bin/vgdb --pid=6547 relaying data between gdb and process 6547 warning: remote target does not support file transfer, attempting to access files from local filesystem. Reading symbols from /lib64/ld-linux-x86-64.so.2... Reading symbols from /usr/lib/debug/.build-id/a9/700083811ae36d1017fe16ebe5657d59cdda0a.debug... 0x000000000401a810 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) cont Continuing. [New Thread 6571] [New Thread 6572] [New Thread 6573] [New Thread 6574] [New Thread 6575] [New Thread 6576] Thread 1 received signal SIGTRAP, Trace/breakpoint trap. 0x0000000013dd23c8 in ?? () (gdb) set width 0 (gdb) set pagination off (gdb) bt #0 0x0000000013dd23c8 in ?? () #1 0x0000001ffeff6f70 in ?? () #2 0x0000000008a717e8 in pixman_gradient_walker_pixel_32 (walker=0xdfb2652, x=137422171408) at ../../pixman/pixman-gradient-walker.c:199 #3 0x000000000dfb264f in ?? () #4 0x0000000000000044 in ?? () #5 0x000000000dfb264f in ?? () #6 0x000000000dfb264f in ?? () #7 0x000000000dfb264f in ?? () #8 0x000000000dfb264f in ?? () #9 0x000000000dfb264f in ?? () #10 0x000f8000fff08000 in ?? () #11 0x0000001ffeff6f70 in ?? () #12 0x0000000008a719b0 in ?? () at ../../pixman/pixman-gradient-walker.c:178 from /lib/x86_64-linux-gnu/libpixman-1.so.0 #13 0x00000000feff6d20 in ?? () #14 0x000000000dfb2650 in ?? () #15 0x000000000dfb10b0 in ?? () #16 0x000000000e58c1b0 in ?? () #17 0x0000000000000003 in ?? () #18 0x000000000dfb2890 in ?? () #19 0x0000000006742280 in jit_machine_stack_exec (arguments=arguments@entry=0x1ffeffed10, executable_func=<optimized out>) at src/pcre2_jit_match.c:57 #20 0x0000000006776894 in pcre2_jit_match_8 (code=0xdfb10b0, subject=0x989681 <error: Cannot access memory at address 0x989681>, length=<optimized out>, start_offset=<optimized out>, options=options@entry=0, match_data=0x1ffeff6ef0, mcontext=0x1233dae0) at src/pcre2_jit_match.c:168 #21 0x00000000055f1edc in g_match_info_next (match_info=match_info@entry=0xd4aa910, error=error@entry=0x1ffeffee90) at ../../../glib/gregex.c:1119 #22 0x00000000055f3be8 in g_regex_match_full (regex=<optimized out>, string=string@entry=0xdfb2650 "$^", string_len=string_len@entry=2, start_position=start_position@entry=0, match_options=match_options@entry=G_REGEX_MATCH_DEFAULT, match_info=match_info@entry=0x1ffeffee88, error=0x1ffeffee90) at ../../../glib/gregex.c:2294 #23 0x00000000055f484d in g_regex_replace_eval (regex=<optimized out>, string=string@entry=0xdfb2650 "$^", string_len=2, string_len@entry=-1, start_position=start_position@entry=0, match_options=match_options@entry=G_REGEX_MATCH_DEFAULT, eval=eval@entry=0x576e5e0 <replace_delimiter>, user_data=0xcfd7cb0, error=0x0) at ../../../glib/gregex.c:3480 #24 0x000000000576ee71 in expand_regex_delimiters (len=-1, regex=0xdfb2650 "$^", parser_state=0xcfd7cb0) at ../gtksourceview/gtksourcelanguage-parser-2.c:1133 #25 expand_regex (parser_state=parser_state@entry=0xcfd7cb0, regex=0xdfb2650 "$^", regex@entry=0x12030da0 "$^", flags=flags@entry=G_REGEX_DEFAULT, insert_parentheses=insert_parentheses@entry=1, error=error@entry=0x1ffefff048, do_expand_vars=1) at ../gtksourceview/gtksourcelanguage-parser-2.c:1201 #26 0x000000000576ff27 in handle_define_regex_element (parser_state=0xcfd7cb0) at ../gtksourceview/gtksourcelanguage-parser-2.c:1306 #27 element_start (parser_state=0xcfd7cb0) at ../gtksourceview/gtksourcelanguage-parser-2.c:1552 #28 file_parse (filename=<optimized out>, language=<optimized out>, ctx_data=<optimized out>, defined_regexes=<optimized out>, styles=<optimized out>, loaded_lang_ids=<optimized out>, replacements=<optimized out>, error=<optimized out>) at ../gtksourceview/gtksourcelanguage-parser-2.c:1682 #29 0x0000000005771637 in parse_language_with_id (lang_id=0xd0b0c70 "def", parser_state=0xdd828f0) at ../gtksourceview/gtksourcelanguage-parser-2.c:1360 #30 parse_style (parser_state=0xdd828f0) at ../gtksourceview/gtksourcelanguage-parser-2.c:1430 #31 handle_styles_element (parser_state=0xdd828f0) at ../gtksourceview/gtksourcelanguage-parser-2.c:1532 #32 element_start (parser_state=0xdd828f0) at ../gtksourceview/gtksourcelanguage-parser-2.c:1556 #33 file_parse (filename=filename@entry=0xdf12a40 "/usr/share/gtksourceview-4/language-specs/changelog.lang", language=language@entry=0xdf12830, ctx_data=ctx_data@entry=0x1345e350, defined_regexes=defined_regexes@entry=0x1345e430, styles=styles@entry=0x136929b0, loaded_lang_ids=loaded_lang_ids@entry=0x1345e5b0, replacements=<optimized out>, error=<optimized out>) at ../gtksourceview/gtksourcelanguage-parser-2.c:1682 #34 0x0000000005771cc8 in _gtk_source_language_file_parse_version2 (language=language@entry=0xdf12830, ctx_data=ctx_data@entry=0x1345e350) at ../gtksourceview/gtksourcelanguage-parser-2.c:1820 #35 0x000000000573c2e7 in gtk_source_language_parse_file (language=language@entry=0xdf12830) at ../gtksourceview/gtksourcelanguage.c:735 #36 0x000000000573d2a1 in _gtk_source_language_create_engine (language=language@entry=0xdf12830) at ../gtksourceview/gtksourcelanguage.c:762 #37 0x00000000057270f1 in gtk_source_buffer_set_language (language=0xdf12830, buffer=0x13690fe0) at ../gtksourceview/gtksourcebuffer.c:1832 #38 gtk_source_buffer_set_language (buffer=0x13690fe0, language=0xdf12830) at ../gtksourceview/gtksourcebuffer.c:1810 #39 0x00000000048b117d in gitg_diff_view_file_renderer_text_init_highlighting_buffer_from_stream_co (_data_=0xe012410) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:1621 #40 0x00000000048b193d in gitg_diff_view_file_renderer_text_init_highlighting_buffer_from_stream (self=<optimized out>, file=<optimized out>, location=<optimized out>, stream=<optimized out>, content_type=<optimized out>, cancellable=<optimized out>, _callback_=<optimized out>, _user_data_=<optimized out>) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:1527 #41 0x00000000048b4237 in gitg_diff_view_file_renderer_text_init_highlighting_buffer_co (_data_=0x135586e0) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:1449 #42 0x00000000048b4771 in gitg_diff_view_file_renderer_text_init_highlighting_buffer (self=<optimized out>, file=<optimized out>, from_workdir=<optimized out>, cancellable=<optimized out>, _callback_=<optimized out>, _user_data_=<optimized out>) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:1189 #43 0x00000000048b4d75 in gitg_diff_view_file_renderer_text_init_highlighting_buffer_old_co (_data_=<optimized out>) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:933 #44 0x00000000048b4f59 in gitg_diff_view_file_renderer_text_init_highlighting_buffer_old (_callback_=0x48b0e60 <____lambda58__gasync_ready_callback>, _user_data_=<optimized out>, cancellable=0x133537c0, self=0xe251fe0) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:891 #45 gitg_diff_view_file_renderer_text_update_highlight (self=0xe251fe0) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:853 #46 0x0000000005539e44 in g_object_new_with_custom_constructor (class=class@entry=0x139dcfd0, params=params@entry=0x1ffefff710, n_params=n_params@entry=3) at ../../../gobject/gobject.c:2580 #47 0x000000000553bf0f in g_object_new_internal (n_params=3, params=0x1ffefff710, class=0x139dcfd0) at ../../../gobject/gobject.c:2604 #48 g_object_new_valist (object_type=<optimized out>, first_property_name=first_property_name@entry=0x48f2daa "info", var_args=var_args@entry=0x1ffefff9e0) at ../../../gobject/gobject.c:2945 #49 0x000000000553c67d in g_object_new (object_type=<optimized out>, first_property_name=first_property_name@entry=0x48f2daa "info") at ../../../gobject/gobject.c:2418 #50 0x00000000048b1df2 in gitg_diff_view_file_renderer_text_construct (object_type=<optimized out>, info=<optimized out>, can_select=<optimized out>, style=<optimized out>) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-renderer-text.c:722 #51 0x00000000048baf21 in gitg_diff_view_file_add_text_renderer (self=0xf470390, handle_selection=0) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file.c:624 #52 0x00000000048c3c43 in ___lambda68_ (progress=<error reading variable: value has been optimized out>, delta=0x9ca9cf0, _data16_=0xf06ce10) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view.c:3016 #53 ____lambda68__ggit_diff_file_callback (delta=0x9ca9cf0, delta@entry=<error reading variable: value has been optimized out>, progress=<error reading variable: value has been optimized out>, self=0xf06ce10, self@entry=<error reading variable: value has been optimized out>) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view.c:3263 #54 0x000000000883d918 in git_patch__invoke_callbacks (patch=0xf06e4b0, file_cb=<optimized out>, binary_cb=0x58b6620 <ggit_diff_binary_callback_wrapper>, hunk_cb=0x58b65d0 <ggit_diff_hunk_callback_wrapper>, line_cb=0x58b6500 <ggit_diff_line_callback_wrapper>, payload=0x1ffefffc70) at ./src/libgit2/patch.c:25 #55 0x00000000087fb6dc in git_diff_foreach (diff=0x132d1c10, file_cb=file_cb@entry=0x58b6670 <ggit_diff_file_callback_wrapper>, binary_cb=binary_cb@entry=0x58b6620 <ggit_diff_binary_callback_wrapper>, hunk_cb=hunk_cb@entry=0x58b65d0 <ggit_diff_hunk_callback_wrapper>, data_cb=data_cb@entry=0x58b6500 <ggit_diff_line_callback_wrapper>, payload=payload@entry=0x1ffefffc70) at ./src/libgit2/diff.c:149 #56 0x00000000058b6dad in ggit_diff_foreach (diff=diff@entry=0xed117c0, file_cb=file_cb@entry=0x48c3920 <____lambda68__ggit_diff_file_callback>, binary_cb=binary_cb@entry=0x48bece0 <____lambda73__ggit_diff_binary_callback>, hunk_cb=hunk_cb@entry=0x48bee30 <____lambda74__ggit_diff_hunk_callback>, line_cb=line_cb@entry=0x48bfd80 <____lambda75__ggit_diff_line_callback>, user_data=user_data@entry=0xf06ce10, error=0x1ffefffd20) at ../libgit2-glib/ggit-diff.c:706 #57 0x00000000048c0db4 in gitg_diff_view_update_diff_hunks (cancellable=<optimized out>, infomap=<optimized out>, preserve_expanded=0, diff=0xed117c0, self=0xebaaf10) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view.c:3446 #58 __lambda65_ (_data14_=<optimized out>) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view.c:2326 #59 ___lambda65__gitg_diff_view_anon (self=<optimized out>) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view.c:2333 #60 0x00000000048c013c in _____lambda76_ (obj=<optimized out>, res=<optimized out>, _data15_=0xed27540) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view.c:2391 #61 ______lambda76__gasync_ready_callback (source_object=<optimized out>, res=<optimized out>, self=0xed27540) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view.c:2399 #62 0x00000000053e26e3 in g_task_return_now (task=task@entry=0xf480b60) at ../../../gio/gtask.c:1361 #63 0x00000000053e3383 in g_task_return (type=<optimized out>, task=0xf480b60) at ../../../gio/gtask.c:1430 #64 g_task_return (task=0xf480b60, type=<optimized out>) at ../../../gio/gtask.c:1387 #65 0x00000000048ad6b5 in gitg_diff_view_file_info_query_co (_data_=0xf480af0) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-info.c:388 #66 0x00000000053e26e3 in g_task_return_now (task=task@entry=0xf480fc0) at ../../../gio/gtask.c:1361 #67 0x00000000053e3383 in g_task_return (type=<optimized out>, task=0xf480fc0) at ../../../gio/gtask.c:1430 #68 g_task_return (task=0xf480fc0, type=<optimized out>) at ../../../gio/gtask.c:1387 #69 0x00000000048aca65 in gitg_diff_view_file_info_query_content_co (_data_=0xf480c60) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-info.c:814 #70 0x00000000053e26e3 in g_task_return_now (task=task@entry=0xe8657e0) at ../../../gio/gtask.c:1361 #71 0x00000000053e3383 in g_task_return (type=<optimized out>, task=0xe8657e0) at ../../../gio/gtask.c:1430 #72 g_task_return (task=0xe8657e0, type=<optimized out>) at ../../../gio/gtask.c:1387 #73 0x00000000048ac33d in gitg_diff_view_file_info_guess_content_type_co (_data_=0xea04130) at libgitg/libgitg-1.0.so.0.0.0.p/gitg-diff-view-file-info.c:953 #74 0x00000000053e26e3 in g_task_return_now (task=task@entry=0xe866920) at ../../../gio/gtask.c:1361 #75 0x00000000053e3383 in g_task_return (type=<optimized out>, task=0xe866920) at ../../../gio/gtask.c:1430 #76 g_task_return (task=0xe866920, type=<optimized out>) at ../../../gio/gtask.c:1387 #77 0x00000000053ad694 in read_all_callback (stream=0xef7c800, result=<optimized out>, user_data=0xe866920) at ../../../gio/ginputstream.c:745 #78 0x00000000053ae2ae in async_ready_callback_wrapper (source_object=0xef7c800, res=0xe866a20, user_data=0xe866920) at ../../../gio/ginputstream.c:565 #79 0x00000000053e26e3 in g_task_return_now (task=task@entry=0xe866a20) at ../../../gio/gtask.c:1361 #80 0x00000000053e271d in complete_in_idle_cb (task=0xe866a20) at ../../../gio/gtask.c:1375 #81 0x00000000055d8e3f in g_main_dispatch (context=context@entry=0x9ba7290) at ../../../glib/gmain.c:3344 #82 0x00000000055daec7 in g_main_context_dispatch_unlocked (context=0x9ba7290) at ../../../glib/gmain.c:4152 #83 g_main_context_iterate_unlocked (context=context@entry=0x9ba7290, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4217 #84 0x00000000055db4e0 in g_main_context_iteration (context=context@entry=0x9ba7290, may_block=may_block@entry=1) at ../../../glib/gmain.c:4282 #85 0x000000000541248d in g_application_run (application=application@entry=0x9ba3210, argc=argc@entry=1, argv=argv@entry=0x1fff000298) at ../../../gio/gapplication.c:2712 #86 0x000000000012b425 in gitg_main_main (args_length1=1, args=0x1fff000298) at gitg/gitg.p/gitg.c:144 #87 main (argc=1, argv=0x1fff000298) at gitg/gitg.p/gitg.c:153 (gdb) https://www.mail-archive.com/pcre-dev@exim.org/msg06407.html --- debian/rules.orig 2024-06-18 00:39:20.000000000 +0200 +++ debian/rules 2024-06-18 00:41:01.756882706 +0200 @@ -16,3 +16,3 @@ deb_maint_conf_args = --enable-pcre2-16 ifneq ($(filter amd64 armel armhf arm64 i386 mips mipsel mips64el powerpc ppc64 ppc64el riscv64 s390x, $(DEB_HOST_ARCH)),) -deb_maint_conf_args +=--enable-jit +deb_maint_conf_args +=--enable-jit --enable-valgrind else . dpkg -i libpcre2-8-0_10.42-4_amd64.deb libpcre2-8-0-dbgsym_10.42-4_amd64.deb