summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-09-04 03:00:41 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-09-04 03:00:41 +0000
commitd83b951fa3f6da1174faa10c85b6cf8626d0c05a (patch)
treeda4d1e3c8e4d67300b99a29dd5ac3b2decc59fb9
parentab9c74ec6adf2058a46bb4be4382d535d75ea930 (diff)
parentfe2bf982759e4cffbfb527f54319e281ce6cfd77 (diff)
Snap for 7703768 from fe2bf982759e4cffbfb527f54319e281ce6cfd77 to sc-qpr1-release
Change-Id: I066c7c0fe12b96b4ffd0d731958dc37c380493a2
-rw-r--r--libartbase/base/memfd.h4
-rw-r--r--runtime/jit/jit.cc3
-rw-r--r--sigchainlib/sigchain.cc2
3 files changed, 7 insertions, 2 deletions
diff --git a/libartbase/base/memfd.h b/libartbase/base/memfd.h
index 0bb336d45a..3c27dcb9e3 100644
--- a/libartbase/base/memfd.h
+++ b/libartbase/base/memfd.h
@@ -53,6 +53,10 @@
# define F_SEAL_FUTURE_WRITE 0x0010
#endif
+#ifndef MFD_CLOEXEC
+# define MFD_CLOEXEC 0x0001U
+#endif
+
#ifndef MFD_ALLOW_SEALING
# define MFD_ALLOW_SEALING 0x0002U
#endif
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 5ee88718dc..876e12091c 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -1238,7 +1238,8 @@ void Jit::CreateThreadPool() {
// Start with '/boot' and end with '.art' to match the pattern recognized
// by android_os_Debug.cpp for boot images.
const char* name = "/boot-image-methods.art";
- unique_fd mem_fd = unique_fd(art::memfd_create(name, /* flags= */ MFD_ALLOW_SEALING));
+ unique_fd mem_fd =
+ unique_fd(art::memfd_create(name, /* flags= */ MFD_ALLOW_SEALING | MFD_CLOEXEC));
if (mem_fd.get() == -1) {
PLOG(WARNING) << "Could not create boot image methods file descriptor";
return;
diff --git a/sigchainlib/sigchain.cc b/sigchainlib/sigchain.cc
index 1935d454f8..8aa47600bf 100644
--- a/sigchainlib/sigchain.cc
+++ b/sigchainlib/sigchain.cc
@@ -405,7 +405,7 @@ void SignalChain::Handler(int signo, siginfo_t* siginfo, void* ucontext_raw) {
if (handler == SIG_IGN) {
return;
} else if (handler == SIG_DFL) {
- fatal("exiting due to SIG_DFL handler for signal %d", signo);
+ fatal("exiting due to SIG_DFL handler for signal %d, ucontext %p", signo, ucontext);
} else {
handler(signo);
}