From 5459468dd6c9501d95e4d32b51682d75c437883b Mon Sep 17 00:00:00 2001 From: thakis Date: Wed, 20 Apr 2016 07:28:03 -0700 Subject: [PATCH] 32-bit linux: Force 16-byte stack alignment. clang assumes 16-byte stack alignment, but incoming stack alignment isn't always guaranteed to be that way. It looks like v8 was lucky to not hit this so far. See https://crbug.com/418554 -- this makes v8's standalone config match Chromium. See also https://llvm.org/bugs/show_bug.cgi?id=21414 Maybe it's possible to change the caller of OnEntryHook() to guarantee the right alignment, but matching Chromium's build flags here seems like a good idea in general. BUG=v8:4928 LOG=n Committed: https://crrev.com/3afb3324941625559635380ef98a2ee73e370a0a Cr-Commit-Position: refs/heads/master@{#35597} Review URL: https://codereview.chromium.org/1899783002 Cr-Commit-Position: refs/heads/master@{#35662} --- build/standalone.gypi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/standalone.gypi b/build/standalone.gypi index fbe8cc4372..aba05be40b 100644 --- a/build/standalone.gypi +++ b/build/standalone.gypi @@ -463,6 +463,9 @@ }], ], }], + ['clang==1 and target_arch=="ia32"', { + 'cflags': ['-mstack-alignment=16', '-mstackrealign'], + }], ['fastbuild!=0', { 'conditions': [ ['OS=="win" and fastbuild==1', {