https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79774
--- Comment #2 from xuliqun <zhoujun48 at huawei dot com> --- Makefile like this : NATIVE_CAMERA_LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MULTILIB := first LOCAL_PATH := $(NATIVE_CAMERA_LOCAL_PATH) LOCAL_SRC_FILES := \ CameraManagerImpl.cpp \ CameraParametersManagerImpl.cpp \ CameraManager.cpp LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ liblog \ libbinder \ libhardware \ libui \ libgui \ libcamera_metadata \ libcamera_client \ libHWCamCfgSvr \ libvconf \ libc_secshared LOCAL_C_INCLUDES += \ bionic \ $(TOP)/frameworks/multimedia/av/include/ \ $(TOP)/frameworks/api/include/ \ $(TOP)/frameworks/api/camera/include/ \ $(TOP)/vendor/hisi/ap/hardware/camera3/include/ \ $(TOP)/external/vconf/include \ $(TOP)/external/vconf-internal-keys/include \ $(TOP)/vendor/huawei/chipset_common/modules/libc_sec/include LOCAL_CXX_STL := libc++ LOCAL_CFLAGS := -lasan -fsanitize=address -DLOG_TAG=\"Camera\" LOCAL_MODULE:= libcameramanager LOCAL_MODULE_TAGS:= optional include $(BUILD_SHARED_LIBRARY) for LOCAL_CFLAGS := -lasan -fsanitize=address -DLOG_TAG=\"Camera\" if I add -lasan -fsanitize=address ,then appears such error: undefined reference to '__asan_report_load8' if I get rid of -lasan -fsanitize=address ,then there is no errors.