These patches are all errors found by running perf test with the ubsan (undefined behavior sanitizer version of perf).
To repro the bug fixed in the "Fix insn.c misaligned address error" patch you must first apply the changes in the Fix backward-ring-buffer.c format-truncation error and Fix ordered-events.c array-bounds error patches since these are necessary to get the ubsan version of perf to build. To build the ubsan version, run: make -C tools/perf USE_CLANG=1 EXTRA_CFLAGS="-fsanitize=undefined" Numfor Mbiziwo-Tiapo (3): Fix backward-ring-buffer.c format-truncation error Fix ordered-events.c array-bounds error Fix insn.c misaligned address error tools/perf/tests/backward-ring-buffer.c | 2 +- tools/perf/util/intel-pt-decoder/insn.c | 3 ++- tools/perf/util/ordered-events.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) -- 2.22.0.657.g960e92d24f-goog