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

Martin Buchholz martinrb at google.com
Tue Jul 10 03:07:28 UTC 2018


clang and gcc both have
__builtin_frame_address(0)
we could simply check alignment of that

On Mon, Jul 9, 2018 at 7:53 PM, Martin Buchholz <martinrb at google.com> wrote:

> There's only one remaining problem building latest jdk with latest clang
> on Linux preventing it from working out of the box.  It seems likely macosx
> has the same problem.
>
> https://bugs.openjdk.java.net/browse/JDK-8186780
> clang-4.0 fastdebug assertion failure in os_linux_x86:os::verify_stack_
> alignment()
>
> Verifying stack alignment seems rather fragile, especially in the presence
> of inlining.
>
> There are various things we can do:
> - making os::verify_stack_alignment NOINLINE and/or moving
> os::verify_stack_alignment to its own translation unit.
> - simply disabling the stack alignment check for clang
> - I don't see any reason why esp should be aligned even if stack frames
> are.  (Maybe ebp is better?  I'm not a x86 assembly programmer) More
> principled seems invoking functions recursively and disabling inlining and
> checking that the difference between addresses of a local is a multiple of
> the alignment, but that will get complicated.
> - why does stack alignment even matter? Isn't it the alignment of c++
> objects on the stack that matter?
>


More information about the hotspot-runtime-dev mailing list