Merge "Use PR_SET_VMA_ANON_NAME to name the abort message mapping." am: 14025fd2bf

am: 04b0178166

Change-Id: Ice9d7517cad46476c0d331065946d6ebdd3ab2ca
This commit is contained in:
Peter Collingbourne 2019-03-27 18:39:38 -07:00 committed by android-build-merger
commit 9d4306cde4

View file

@ -33,6 +33,7 @@
#include <stddef.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/prctl.h>
#include "private/bionic_defs.h"
#include "private/bionic_globals.h"
@ -82,6 +83,10 @@ void android_set_abort_message(const char* msg) {
return;
}
// Name the abort message mapping to make it easier for tools to find the
// mapping.
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map, size, "abort message");
magic_abort_msg_t* new_magic_abort_message = reinterpret_cast<magic_abort_msg_t*>(map);
fill_abort_message_magic(new_magic_abort_message);
new_magic_abort_message->msg.size = size;