Re: [PATCH 2/2] tools/x86: Fix some potential undefined behavior

2020-10-15 Thread Masami Hiramatsu
Hi, Please merge the change on arch/x86/lib/insn.c and tools/arch/x86/lib/insn.c to a single patch for bisecting. Thank you, On Wed, 14 Oct 2020 23:21:48 -0700 Ian Rogers wrote: > From: Numfor Mbiziwo-Tiapo > > If insn_init is given a NULL kaddr and 0 buflen then validate_next will >

[PATCH 2/2] tools/x86: Fix some potential undefined behavior

2020-10-15 Thread Ian Rogers
From: Numfor Mbiziwo-Tiapo If insn_init is given a NULL kaddr and 0 buflen then validate_next will perform arithmetic on NULL, add a guard to avoid this. Don't perform unaligned loads in __get_next and __peek_nbyte_next as these are forms of undefined behavior. These problems were identified