What to do: clang-4.0 fastdebug assertion failure in os_linux_x86:os::verify_stack_alignment()

Martin Buchholz martinrb at google.com
Wed Jul 11 14:56:47 UTC 2018

On Wed, Jul 11, 2018 at 7:34 AM, Christian Thalinger <cthalinger at twitter.com
> wrote:

> > - why does stack alignment even matter? Isn't it the alignment of c++
> > objects on the stack that matter?
> C++ compilers can (and actually do) emit instructions that need alignment,
> like movaps.  I’ve seen many crashes in the past with movaps and an
> unaligned stack coming from JIT or stub code.

Sure, actual instructions need alignment.  But os::verify_stack_alignment
isn't doing a good job of finding misaligned instructions, while causing
trouble for clang builds.  Christian, what do you suggest we do to fix the
failing assertion in os::verify_stack_alignment ?

I don't know what movaps does, but perhaps os::verify_stack_alignment could
simply use that instruction via inline asm?

More information about the hotspot-runtime-dev mailing list