Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Issue 2556723008: android: Realign stack pointer on JNI entry. (Closed)

Created:
4 years ago by amineer
Modified:
4 years ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2883
Target Ref:
refs/pending/branch-heads/2883
Project:
chromium
Visibility:
Public.

Description

android: Realign stack pointer on JNI entry. M55 merge Dalvik JIT generated code doesn't always align the stack to a 16 byte boundary when calling into native, causing crashes in code that expects 16 byte alignment. Force the compiler to realign the stack when entering native from Java, so that other code can assume 16 byte alignment as expected by the ABI. Move the function attributes into a macro so that the generated header file is less repetitive (this also makes the generator less repetitive as a bonus). Also, to stop presubmit complaining about golden_sample_for_tests_jni.h not being correctly clang-formatted, rename it to .golden like the other test files. BUG=655248, 672670 Review-Url: https://codereview.chromium.org/2531273002 Cr-Commit-Position: refs/heads/master@{#435632} (cherry picked from commit 7be1137994eecca6c54831e4c3d3d4f934ea8602) Committed: https://chromium.googlesource.com/chromium/src/+/01a46f06cc1a85d62abd4fd83e13ff3c07c91262 Committed: https://chromium.googlesource.com/chromium/src/+/366e9038733510ba1e448b056870d55a1b5d11a5

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -663 lines) Patch
M base/android/jni_generator/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
A + base/android/jni_generator/SampleForTests_jni.golden View 10 chunks +19 lines, -36 lines 0 comments Download
D base/android/jni_generator/golden_sample_for_tests_jni.h View 1 chunk +0 lines, -546 lines 0 comments Download
M base/android/jni_generator/jni_generator.py View 2 chunks +2 lines, -4 lines 0 comments Download
M base/android/jni_generator/jni_generator_helper.h View 2 chunks +21 lines, -11 lines 0 comments Download
M base/android/jni_generator/jni_generator_tests.py View 1 chunk +1 line, -1 line 0 comments Download
M base/android/jni_generator/testInnerClassNatives.golden View 1 chunk +2 lines, -2 lines 0 comments Download
M base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden View 1 chunk +4 lines, -4 lines 0 comments Download
M base/android/jni_generator/testInnerClassNativesMultiple.golden View 2 chunks +4 lines, -4 lines 0 comments Download
M base/android/jni_generator/testMultipleJNIAdditionalImport.golden View 1 chunk +2 lines, -2 lines 0 comments Download
M base/android/jni_generator/testNativeExportsOnlyOption.golden View 4 chunks +6 lines, -12 lines 0 comments Download
M base/android/jni_generator/testNatives.golden View 12 chunks +31 lines, -36 lines 0 comments Download
M base/android/jni_generator/testNativesLong.golden View 1 chunk +1 line, -2 lines 0 comments Download
M base/android/jni_generator/testSingleJNIAdditionalImport.golden View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (5 generated)
amineer
Committed patchset #1 (id:1) manually as 01a46f06cc1a85d62abd4fd83e13ff3c07c91262.
4 years ago (2016-12-09 03:23:00 UTC) #5
amineer
4 years ago (2016-12-09 05:16:18 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
366e9038733510ba1e448b056870d55a1b5d11a5.

Powered by Google App Engine
This is Rietveld 408576698