frame-pointer chains (via EBP), don't continue if EBP doesn't contain
a 4-aligned value. A misaligned EBP is almost certainly invalid --
hence, no loss in unwind capability here -- and the misaligned access
causes gcc 5.1 ubsan alignment checks to fail. So avoid them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15400
/* This deals with frames resulting from functions which begin "pushl%
ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */
if (fp_min <= uregs.xbp &&
- uregs.xbp <= fp_max - 1 * sizeof(UWord)/*see comment below*/)
+ uregs.xbp <= fp_max - 1 * sizeof(UWord)/*see comment below*/ &&
+ VG_IS_4_ALIGNED(uregs.xbp))
{
/* fp looks sane, so use it. */
uregs.xip = (((UWord*)uregs.xbp)[1]);