Commit 45c6c990 authored by Kenny Root's avatar Kenny Root Committed by Alex Klyubin
Browse files

Do not sanitize the host JNI library

Sanitization currently makes this library reference symbols which
cannot be resolved at runtime without additional magic when starting
the JVM.

Disable this until we can find a fix. This currently fails with:
libconscrypt_openjdk_jni.so: undefined symbol: __asan_option_detect_stack_use_after_return
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
	at java.lang.Runtime.loadLibrary0(Runtime.java:849)
	at java.lang.System.loadLibrary(System.java:1088)
	at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:25)
	at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:54)
	at org.conscrypt.OpenSSLBIOInputStream.<init>(OpenSSLBIOInputStream.java:34)
	at org.conscrypt.OpenSSLX509Certificate.fromX509PemInputStream(OpenSSLX509Certificate.java:119)
	at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:220)
	at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:216)
	at org.conscrypt.OpenSSLX509CertificateFactory$Parser.generateItem(OpenSSLX509CertificateFactory.java:94)
	at org.conscrypt.OpenSSLX509CertificateFactory.engineGenerateCertificate(OpenSSLX509CertificateFactory.java:272)
	at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
	at com.android.signapk.SignApk.readPublicKey(SignApk.java:161)
	at com.android.signapk.SignApk.main(SignApk.java:933)

Bug: 26160319
Change-Id: Icd5ffb49eb5610552af0dd049db99a0b9f181cba
parent ecb1da1c
......@@ -330,6 +330,12 @@ LOCAL_CFLAGS += -DNO_KEYSTORE_ENGINE
LOCAL_CXX_STL := libc++_static
LOCAL_WHOLE_STATIC_LIBRARIES := libcrypto_static libssl_static-host
LOCAL_MULTILIB := both
# TODO: b/26097626. ASAN breaks use of this library in JVM.
# Re-enable sanitization when the issue with making clients of this library
# preload ASAN runtime is resolved. Without that, clients are getting runtime
# errors due to unresoled ASAN symbols, such as
# __asan_option_detect_stack_use_after_return.
LOCAL_SANITIZE := never
include $(BUILD_HOST_SHARED_LIBRARY)
# Conscrypt Java library for host OpenJDK
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment