qemu/contrib/plugins
Yodel Eldar 81143b7f9d contrib/plugins/execlog: Add tab to the separator search of insn_disas
Currently, execlog searches for a space separator between the
instruction mnemonic and operands, but some disassemblers, e.g. Alpha's,
use a tab separator instead; this results in a null pointer being passed
as the haystack in g_strstr during a subsequent register search, i.e.
undefined behavior, because of a missing null check.

This patch adds tab to the separator search and a null check on the
result.

Also, an affected pointer is changed to const.

Lastly, a break statement was added to immediately terminate the
register search when a user-requested register is found in the current
instruction as a trivial optimization, because searching for the
remaining requested registers is unnecessary once one is found.

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Yodel Eldar <yodel.eldar@gmail.com>
Message-ID: <20250630164124.26315-2-yodel.eldar@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250710104531.3099313-4-alex.bennee@linaro.org>
2025-07-14 11:42:49 +01:00
..
bbv.c contrib/plugins/bbv.c: Start bb index from 1 2024-12-28 14:42:53 +03:00
cache.c contrib/plugins: Fix type conflict of GLib function pointers 2025-04-25 17:09:58 +02:00
cflow.c contrib/plugins: Fix type conflict of GLib function pointers 2025-04-25 17:09:58 +02:00
drcov.c contrib/plugins/drcov: Fix string format 2023-09-07 12:54:17 +02:00
execlog.c contrib/plugins/execlog: Add tab to the separator search of insn_disas 2025-07-14 11:42:49 +01:00
hotblocks.c contrib/plugins: Fix type conflict of GLib function pointers 2025-04-25 17:09:58 +02:00
hotpages.c contrib/plugins: Fix type conflict of GLib function pointers 2025-04-25 17:09:58 +02:00
howvec.c contrib/plugins: Fix type conflict of GLib function pointers 2025-04-25 17:09:58 +02:00
hwprofile.c contrib/plugins: Fix type conflict of GLib function pointers 2025-04-25 17:09:58 +02:00
ips.c contrib/plugins: allow setting of instructions per quantum 2025-06-07 16:40:44 +01:00
lockstep.c contrib/plugins: add compat for g_memdup2 2024-07-30 11:44:21 +01:00
meson.build meson: fix Windows build 2025-06-16 13:16:27 -04:00
stoptrigger.c contrib/plugins/stoptrigger: fix 32-bit build 2025-01-17 10:44:44 +00:00
win32_linker.c plugins: make test/example plugins work on windows 2023-11-08 15:15:23 +00:00