Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e96d0253 authored by Evgenii Stepanov's avatar Evgenii Stepanov Committed by android-build-merger
Browse files

Merge \\\"Workaround alloc-dealloc-mismatch error on ASan device boot.\\\" am:...

Merge \\\"Workaround alloc-dealloc-mismatch error on ASan device boot.\\\" am: 7d8f2464 am: 23d1d108
am: 316c5165

Change-Id: I585c6737d3811110bd519b5cc375f0219fee7927
parents 8abbfbcd 316c5165
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -90,6 +90,19 @@

EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);

// Workaround for b/30067360: /proc/self/environ inaccessible in SurfaceFlinger
// => ASan fails to read ASAN_OPTIONS => alloc-dealloc-mismatch bug is not
// suppressed and prevents the device from booting.
#ifndef __has_feature
#define __has_feature(x) 0
#endif
#if __has_feature(address_sanitizer)
__attribute__((visibility("default")))
extern "C" const char* __asan_default_options() {
  return "alloc_dealloc_mismatch=0";
}
#endif

namespace android {

// This is the phase offset in nanoseconds of the software vsync event