[Bug c++/79823] New: Address Sanitize compile,got undefined reference to '__asan' errors

2017-03-02 Thread zhoujun48 at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79823

Bug ID: 79823
   Summary: Address Sanitize compile,got undefined reference to
'__asan' errors
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhoujun48 at huawei dot com
  Target Milestone: ---

Address Sanitize,Complie C++ code,GCC
4.9.0(gcc\linux-x86\aarch64\aarch64-linux-android-4.9-kasan),
CFLAGS= -lasan -fsanitize=address,
but get this error:
system/sepolicy/tools/fc_sort/fc_sort.c:49: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:50: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:51: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:91: error: undefined reference to
'__asan_report_load1'

I have already used -lasan,
how to judge to asan lib exist in this gcc tool chain?
who can help me solve this problem
thank u

[Bug c++/79774] gcc -fsanitize=address with error

2017-03-02 Thread zhoujun48 at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79774

--- Comment #5 from xuliqun  ---
Sorry, my gcc is 4.9(\aarch64\aarch64-linux-android-4.9-kasan), not 4.8.4,
Is there any idea,thanku

[Bug c++/79774] gcc -fsanitize=address with error

2017-03-01 Thread zhoujun48 at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79774

--- Comment #3 from xuliqun  ---
by the way, when compile,used gcc for arm64,not x86_64

[Bug c++/79774] gcc -fsanitize=address with error

2017-03-01 Thread zhoujun48 at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79774

--- Comment #2 from xuliqun  ---
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.

[Bug c++/79774] New: gcc -fsanitize=address with error

2017-03-01 Thread zhoujun48 at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79774

Bug ID: 79774
   Summary: gcc -fsanitize=address with error
   Product: gcc
   Version: 4.8.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhoujun48 at huawei dot com
  Target Milestone: ---

Complie C++ code,GCC 4.8.4,CFLAGS= -lasan -fsanitize=address,but get this
error:
system/sepolicy/tools/fc_sort/fc_sort.c:49: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:50: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:51: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:91: error: undefined reference to
'__asan_report_load1'

I have already used -lasan,
who can help me solve this problem
thank u