From d527cf1f993f43d23c0cc171d46849c6e427c493 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Fri, 7 Sep 2018 12:46:02 -0700 Subject: [PATCH] fdsan: add types for Java sockets. Test: art/tools/run-libcore-tests.sh Change-Id: If61211bc4ae225c3f89db989a167f9dc4fce375a --- libc/bionic/fdsan.cpp | 4 ++++ libc/include/android/fdsan.h | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/libc/bionic/fdsan.cpp b/libc/bionic/fdsan.cpp index 31ffa96a4..1cbe6d9b6 100644 --- a/libc/bionic/fdsan.cpp +++ b/libc/bionic/fdsan.cpp @@ -249,6 +249,10 @@ const char* android_fdsan_get_tag_type(uint64_t tag) { return "sqlite"; case ANDROID_FDSAN_OWNER_TYPE_ART_FDFILE: return "ART FdFile"; + case ANDROID_FDSAN_OWNER_TYPE_DATAGRAMSOCKETIMPL: + return "DatagramSocketImpl"; + case ANDROID_FDSAN_OWNER_TYPE_SOCKETIMPL: + return "SocketImpl"; case ANDROID_FDSAN_OWNER_TYPE_GENERIC_00: default: diff --git a/libc/include/android/fdsan.h b/libc/include/android/fdsan.h index dc2bbd5a3..d390c6e57 100644 --- a/libc/include/android/fdsan.h +++ b/libc/include/android/fdsan.h @@ -114,6 +114,12 @@ enum android_fdsan_owner_type { /* ART FdFile */ ANDROID_FDSAN_OWNER_TYPE_ART_FDFILE = 9, + + /* java.net.DatagramSocketImpl */ + ANDROID_FDSAN_OWNER_TYPE_DATAGRAMSOCKETIMPL = 10, + + /* java.net.SocketImpl */ + ANDROID_FDSAN_OWNER_TYPE_SOCKETIMPL = 11, }; /*