Loading debuggerd/Android.mk +3 −3 Original line number Diff line number Diff line Loading @@ -20,8 +20,7 @@ LOCAL_CPPFLAGS := -std=gnu++11 LOCAL_CFLAGS := \ -Wall \ -Wno-array-bounds \ -Werror \ -Wno-unused-parameter \ -Werror ifeq ($(ARCH_ARM_HAVE_VFP),true) LOCAL_CFLAGS_arm += -DWITH_VFP Loading Loading @@ -55,7 +54,7 @@ LOCAL_SRC_FILES_x86 := x86/crashglue.S LOCAL_SRC_FILES_x86_64 := x86_64/crashglue.S LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -fstack-protector-all -Wno-unused-parameter -Wno-free-nonheap-object LOCAL_CFLAGS += -fstack-protector-all -Werror -Wno-free-nonheap-object #LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_SHARED_LIBRARIES := libcutils liblog libc Loading @@ -76,6 +75,7 @@ ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) LOCAL_CFLAGS_arm += -DWITH_VFP_D32 endif # ARCH_ARM_HAVE_VFP_D32 endif # ARCH_ARM_HAVE_VFP == true LOCAL_CFLAGS += -Werror LOCAL_SRC_FILES_arm64 := arm64/vfp.S LOCAL_MODULE_TARGET_ARCH += arm64 Loading debuggerd/arm64/machine.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ void dump_registers(log_t* log, pid_t tid, int scope_flags) io.iov_base = &r; io.iov_len = sizeof(r); bool only_in_tombstone = !IS_AT_FAULT(scope_flags); if (ptrace(PTRACE_GETREGSET, tid, (void*) NT_PRSTATUS, (void*) &io) == -1) { _LOG(log, scope_flags, "ptrace error: %s\n", strerror(errno)); return; Loading debuggerd/crasher.c +7 −7 Original line number Diff line number Diff line Loading @@ -6,13 +6,18 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/cdefs.h> #include <sys/ptrace.h> #include <sys/socket.h> #include <sys/wait.h> #include <unistd.h> #include <cutils/log.h> #include <cutils/sockets.h> #include <log/log.h> #ifndef __unused #define __unused __attribute__((__unused__)) #endif extern const char* __progname; Loading @@ -26,7 +31,7 @@ static void maybe_abort() { } } static int smash_stack(int i) { static int smash_stack(int i __unused) { printf("crasher: deliberately corrupting stack...\n"); // Unless there's a "big enough" buffer on the stack, gcc // doesn't bother inserting checks. Loading @@ -47,11 +52,6 @@ __attribute__((noinline)) static void overflow_stack(void* p) { overflow_stack(&buf); } static void test_call1() { *((int*) 32) = 1; } static void *noisy(void *x) { char c = (uintptr_t) x; Loading Loading
debuggerd/Android.mk +3 −3 Original line number Diff line number Diff line Loading @@ -20,8 +20,7 @@ LOCAL_CPPFLAGS := -std=gnu++11 LOCAL_CFLAGS := \ -Wall \ -Wno-array-bounds \ -Werror \ -Wno-unused-parameter \ -Werror ifeq ($(ARCH_ARM_HAVE_VFP),true) LOCAL_CFLAGS_arm += -DWITH_VFP Loading Loading @@ -55,7 +54,7 @@ LOCAL_SRC_FILES_x86 := x86/crashglue.S LOCAL_SRC_FILES_x86_64 := x86_64/crashglue.S LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -fstack-protector-all -Wno-unused-parameter -Wno-free-nonheap-object LOCAL_CFLAGS += -fstack-protector-all -Werror -Wno-free-nonheap-object #LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_SHARED_LIBRARIES := libcutils liblog libc Loading @@ -76,6 +75,7 @@ ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) LOCAL_CFLAGS_arm += -DWITH_VFP_D32 endif # ARCH_ARM_HAVE_VFP_D32 endif # ARCH_ARM_HAVE_VFP == true LOCAL_CFLAGS += -Werror LOCAL_SRC_FILES_arm64 := arm64/vfp.S LOCAL_MODULE_TARGET_ARCH += arm64 Loading
debuggerd/arm64/machine.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ void dump_registers(log_t* log, pid_t tid, int scope_flags) io.iov_base = &r; io.iov_len = sizeof(r); bool only_in_tombstone = !IS_AT_FAULT(scope_flags); if (ptrace(PTRACE_GETREGSET, tid, (void*) NT_PRSTATUS, (void*) &io) == -1) { _LOG(log, scope_flags, "ptrace error: %s\n", strerror(errno)); return; Loading
debuggerd/crasher.c +7 −7 Original line number Diff line number Diff line Loading @@ -6,13 +6,18 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/cdefs.h> #include <sys/ptrace.h> #include <sys/socket.h> #include <sys/wait.h> #include <unistd.h> #include <cutils/log.h> #include <cutils/sockets.h> #include <log/log.h> #ifndef __unused #define __unused __attribute__((__unused__)) #endif extern const char* __progname; Loading @@ -26,7 +31,7 @@ static void maybe_abort() { } } static int smash_stack(int i) { static int smash_stack(int i __unused) { printf("crasher: deliberately corrupting stack...\n"); // Unless there's a "big enough" buffer on the stack, gcc // doesn't bother inserting checks. Loading @@ -47,11 +52,6 @@ __attribute__((noinline)) static void overflow_stack(void* p) { overflow_stack(&buf); } static void test_call1() { *((int*) 32) = 1; } static void *noisy(void *x) { char c = (uintptr_t) x; Loading