summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oatdump/oatdump_app_test.cc12
-rw-r--r--runtime/arch/x86/asm_support_x86.S2
-rw-r--r--runtime/arch/x86/quick_entrypoints_x86.S14
-rw-r--r--runtime/common_runtime_test.h6
-rw-r--r--sigchainlib/sigchain.cc6
-rw-r--r--test/004-SignalTest/signaltest.cc8
-rw-r--r--test/115-native-bridge/nativebridge.cc2
-rw-r--r--test/knownfailures.json6
8 files changed, 30 insertions, 26 deletions
diff --git a/oatdump/oatdump_app_test.cc b/oatdump/oatdump_app_test.cc
index f12522277b..34b07d2ddf 100644
--- a/oatdump/oatdump_app_test.cc
+++ b/oatdump/oatdump_app_test.cc
@@ -20,25 +20,29 @@ namespace art {
TEST_F(OatDumpTest, TestAppWithBootImage) {
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {}, &error_msg)) << error_msg;
+ ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {"--runtime-arg", "-Xmx64M"}, &error_msg)) << error_msg;
ASSERT_TRUE(Exec(kDynamic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}
TEST_F(OatDumpTest, TestAppWithBootImageStatic) {
TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kStatic, {}, &error_msg)) << error_msg;
+ ASSERT_TRUE(GenerateAppOdexFile(kStatic, {"--runtime-arg", "-Xmx64M"}, &error_msg)) << error_msg;
ASSERT_TRUE(Exec(kStatic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}
TEST_F(OatDumpTest, TestPicAppWithBootImage) {
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {"--compile-pic"}, &error_msg)) << error_msg;
+ ASSERT_TRUE(
+ GenerateAppOdexFile(kDynamic, {"--runtime-arg", "-Xmx64M", "--compile-pic"}, &error_msg))
+ << error_msg;
ASSERT_TRUE(Exec(kDynamic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}
TEST_F(OatDumpTest, TestPicAppWithBootImageStatic) {
TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kStatic, {"--compile-pic"}, &error_msg)) << error_msg;
+ ASSERT_TRUE(
+ GenerateAppOdexFile(kStatic, {"--runtime-arg", "-Xmx64M", "--compile-pic"}, &error_msg))
+ << error_msg;
ASSERT_TRUE(Exec(kStatic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}
diff --git a/runtime/arch/x86/asm_support_x86.S b/runtime/arch/x86/asm_support_x86.S
index 14b01c59be..c9514f5f27 100644
--- a/runtime/arch/x86/asm_support_x86.S
+++ b/runtime/arch/x86/asm_support_x86.S
@@ -79,6 +79,7 @@
#define CFI_REL_OFFSET(reg,size) .cfi_rel_offset reg,size
#define CFI_RESTORE_STATE .cfi_restore_state
#define CFI_REMEMBER_STATE .cfi_remember_state
+ #define CFI_ESCAPE(...) .cfi_escape __VA_ARGS__
#else
// Mac OS' doesn't like cfi_* directives.
#define CFI_STARTPROC
@@ -90,6 +91,7 @@
#define CFI_REL_OFFSET(reg,size)
#define CFI_RESTORE_STATE
#define CFI_REMEMBER_STATE
+ #define CFI_ESCAPE(...)
#endif
// Symbols. On a Mac, we need a leading underscore.
diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S
index abd784a91c..9251161ecc 100644
--- a/runtime/arch/x86/quick_entrypoints_x86.S
+++ b/runtime/arch/x86/quick_entrypoints_x86.S
@@ -2374,8 +2374,8 @@ DEFINE_FUNCTION art_quick_osr_stub
mov 8+16(%esp), %ecx // ECX = size of args
mov 12+16(%esp), %ebx // EBX = pc to call
mov %esp, %ebp // Save stack pointer
- .cfi_def_cfa ebp, SAVE_SIZE // CFA = ebp + SAVE_SIZE
- .cfi_remember_state
+ CFI_DEF_CFA(ebp, SAVE_SIZE) // CFA = ebp + SAVE_SIZE
+ CFI_REMEMBER_STATE
andl LITERAL(0xFFFFFFF0), %esp // Align stack
pushl %ebp // Save old stack pointer
subl LITERAL(12), %esp // Align stack
@@ -2383,14 +2383,14 @@ DEFINE_FUNCTION art_quick_osr_stub
// ebp isn't properly spilled in the osr method, so we need use DWARF expression.
// NB: the CFI must be before the call since this is the address gdb will lookup.
// NB: gdb expects that cfa_expression returns the CFA value (not address to it).
- .cfi_escape /* cfa = [sp + 12] + SAVE_SIZE */ \
+ CFI_ESCAPE( /* cfa = [sp + 12] + SAVE_SIZE */ \
0x0f, 6, /* DW_CFA_def_cfa_expression(len) */ \
0x92, 4, 12, /* DW_OP_bregx(reg,offset) */ \
0x06, /* DW_OP_deref */ \
- 0x23, SAVE_SIZE /* DW_OP_plus_uconst(val) */
+ 0x23, SAVE_SIZE) /* DW_OP_plus_uconst(val) */
call .Losr_entry
mov 12(%esp), %esp // Restore stack pointer.
- .cfi_def_cfa esp, SAVE_SIZE // CFA = esp + SAVE_SIZE
+ CFI_DEF_CFA(esp, SAVE_SIZE) // CFA = esp + SAVE_SIZE
// Restore callee saves.
POP edi
@@ -2413,8 +2413,8 @@ DEFINE_FUNCTION art_quick_osr_stub
movss %xmm0, (%ecx) // Store the floating point result
ret
.Losr_entry:
- .cfi_restore_state
- .cfi_def_cfa ebp, SAVE_SIZE // CFA = ebp + SAVE_SIZE
+ CFI_RESTORE_STATE
+ CFI_DEF_CFA(ebp, SAVE_SIZE) // CFA = ebp + SAVE_SIZE
subl LITERAL(4), %ecx // Given stack size contains pushed frame pointer, substract it.
subl %ecx, %esp
mov %esp, %edi // EDI = beginning of stack
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h
index 7fc70e294f..83a1f9a58a 100644
--- a/runtime/common_runtime_test.h
+++ b/runtime/common_runtime_test.h
@@ -332,12 +332,6 @@ class CheckJniAbortCatcher {
return; \
}
-#define TEST_DISABLED_FOR_COMPACT_DEX() \
- if (kDefaultCompactDexLevel != CompactDexLevel::kCompactDexLevelNone) { \
- printf("WARNING: TEST DISABLED FOR COMPACT DEX\n"); \
- return; \
- }
-
#define TEST_DISABLED_FOR_HEAP_POISONING() \
if (kPoisonHeapReferences) { \
printf("WARNING: TEST DISABLED FOR HEAP POISONING\n"); \
diff --git a/sigchainlib/sigchain.cc b/sigchainlib/sigchain.cc
index 61346b1487..3127c5cfbd 100644
--- a/sigchainlib/sigchain.cc
+++ b/sigchainlib/sigchain.cc
@@ -80,7 +80,7 @@ static void log(const char* format, ...) {
#define fatal(...) log(__VA_ARGS__); abort()
-#if defined(__BIONIC__) && !defined(__LP64__)
+#if defined(__BIONIC__) && !defined(__LP64__) && !defined(__mips__)
static int sigismember(const sigset64_t* sigset, int signum) {
return sigismember64(sigset, signum);
}
@@ -223,7 +223,9 @@ class SignalChain {
SigactionType result;
result.sa_flags = action_.sa_flags;
result.sa_handler = action_.sa_handler;
+#if defined(SA_RESTORER)
result.sa_restorer = action_.sa_restorer;
+#endif
memcpy(&result.sa_mask, &action_.sa_mask,
std::min(sizeof(action_.sa_mask), sizeof(result.sa_mask)));
return result;
@@ -237,7 +239,9 @@ class SignalChain {
} else {
action_.sa_flags = new_action->sa_flags;
action_.sa_handler = new_action->sa_handler;
+#if defined(SA_RESTORER)
action_.sa_restorer = new_action->sa_restorer;
+#endif
sigemptyset(&action_.sa_mask);
memcpy(&action_.sa_mask, &new_action->sa_mask,
std::min(sizeof(action_.sa_mask), sizeof(new_action->sa_mask)));
diff --git a/test/004-SignalTest/signaltest.cc b/test/004-SignalTest/signaltest.cc
index 67118d5e63..49fe369b61 100644
--- a/test/004-SignalTest/signaltest.cc
+++ b/test/004-SignalTest/signaltest.cc
@@ -102,10 +102,14 @@ static struct sigaction oldaction;
bool compare_sigaction(const struct sigaction* lhs, const struct sigaction* rhs) {
// bionic's definition of `struct sigaction` has internal padding bytes, so we can't just do a
// naive memcmp of the entire struct.
+#if defined(SA_RESTORER)
+ if (lhs->sa_restorer != rhs->sa_restorer) {
+ return false;
+ }
+#endif
return memcmp(&lhs->sa_mask, &rhs->sa_mask, sizeof(lhs->sa_mask)) == 0 &&
lhs->sa_sigaction == rhs->sa_sigaction &&
- lhs->sa_flags == rhs->sa_flags &&
- lhs->sa_restorer == rhs->sa_restorer;
+ lhs->sa_flags == rhs->sa_flags;
}
extern "C" JNIEXPORT void JNICALL Java_Main_initSignalTest(JNIEnv*, jclass) {
diff --git a/test/115-native-bridge/nativebridge.cc b/test/115-native-bridge/nativebridge.cc
index 3b352096df..a74f7638bd 100644
--- a/test/115-native-bridge/nativebridge.cc
+++ b/test/115-native-bridge/nativebridge.cc
@@ -229,7 +229,9 @@ static jint trampoline_Java_Main_testSignal(JNIEnv*, jclass) {
struct sigaction64 tmp2;
sigemptyset64(&tmp2.sa_mask);
tmp2.sa_sigaction = test_sigaction_handler;
+#if defined(SA_RESTORER)
tmp2.sa_restorer = nullptr;
+#endif
sigaction64(SIGSEGV, &tmp2, nullptr);
sigaction64(SIGILL, &tmp2, nullptr);
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 476abd332b..b2f579d3b9 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -1,11 +1,5 @@
[
{
- "tests": "1934-jvmti-signal-thread",
- "description": ["Disables 1934-jvmti-signal-thread in tracing configurations"],
- "variant": "trace | stream",
- "bug": "http://b/67384421"
- },
- {
"tests": "153-reference-stress",
"description": ["Disable 153-reference-stress temporarily until a fix",
"arrives."],