Created attachment 142148 [details] Reproducer SUMMARY Valgrind trace (debug) crashes at "al" register after GIT commits 22bae4b1 and 61307ee8. STEPS TO REPRODUCE Attached a reproducer (al_test.c). 1. Compile the attached file: > gcc al_test.c 2. Run it under Valgrind with debugging: > valgrind --trace-flags=10000000 --trace-notbelow=0 ./a.out > vg_trace OBSERVED RESULT The trace file ends with an error message: vex: priv/guest_amd64_toIR.c:946 (nameIReg): Assertion `reg >= 4 && reg < 8' failed. vex storage: T total 53281728 bytes allocated vex storage: P total 512 bytes allocated valgrind: the 'impossible' happened: LibVEX called failure_exit(). host stacktrace: ==442872== at 0x580285F2: show_sched_status_wrk (m_libcassert.c:406) ==442872== by 0x580286F7: report_and_quit (m_libcassert.c:477) ==442872== by 0x58028935: vgPlain_core_panic_at (m_libcassert.c:553) ==442872== by 0x5802895A: vgPlain_core_panic (m_libcassert.c:563) ==442872== by 0x58040112: failure_exit (m_translate.c:766) ==442872== by 0x580FE9A8: vex_assert_fail (main_util.c:249) ==442872== by 0x5813EF4D: nameIRegRexB (guest_amd64_toIR.c:946) ==442872== by 0x58158F03: dis_ESC_NONE.isra.50 (guest_amd64_toIR.c:21060) ==442872== by 0x581A35C7: disInstr_AMD64_WRK (guest_amd64_toIR.c:32980) EXPECTED RESULT The trace file does not contain error messages SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION The cause is, function "nameIRegRexB" classifies "al" as "irregular", while other functions, like "getIRegRexB", correctly classify it as regular. Attached a fix (al_debug_fix.patch).
Created attachment 142149 [details] Possible fix
I'll take a look at this and try to get it into 3.18.
Change committed with commit 1c57706fbdc7f4ebd866aeade0900f437942f44c