Hi,kcc Still need you a little help here:) I tried build a thired party exectablue on X86 linux ubunutu 12.04, got the readelf result: readelf *asan_double_free* -d | grep NEEDED 0x0000000000000001 (NEEDED) Shared library: [libasan.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] Why the asan runtime lib libasan.so.0 is needed before libc.so.6, does linux have any special env settings? And on arm platfrom,the readelf result, libc.so is ahead of libasan.so.1, how cound I change this order and load the libasan.so.1 first like on X86 linux platfrom? > arm-linux-androideabi-readelf -d asan_use_after_free | grep NEEDED > 0x00000001 (NEEDED) Shared library: [libc.so] > 0x00000001 (NEEDED) Shared library: [libstdc++.so] > 0x00000001 (NEEDED) Shared library: [libm.so] > 0x00000001 (NEEDED) Shared library: [libasan.so.1] > 0x00000001 (NEEDED) Shared library: [libdl.so]
在 2014年7月28日星期一UTC+8下午6时08分50秒,kcc写道: > > On Mon, Jul 28, 2014 at 2:04 PM, ji wang <[email protected] > <javascript:>> wrote: > >>> Do we have to use LD_PRELOAD to preload this asan run-time Dso to the > >> >process before this Asan instrumented executable run?And why? > >> >I've tried not preload the asan run-time at first, and I got the > > > >>Please give more context: where did you try that and what exactly did > you > >> do. > > > > I am using Asan DSO enabled GCC4.9 android toolchain to test one shared > lib > > on android platform. And only this lib recompiled with Asan. > > > > When I loaded this recompiled lib and got "AddressSanitizer: failed to > > intercept 'memcpy'" error, LD_PRELOAD can fix it but I don't want > > use it because in some situation I really don't know where to place this > > LD_PRELOAD thing and even I know the place still a litte diffcult to use > it. > > So I modified the code like I post in my last reply. > > And now I want to know do we have to use LD_PRELOAD to preload the asan > DSO? > > so the same on android,arm,X86 platform? and why? and does my > modification > > have any side effect? > > The instructions about using DSO are really about regular Linux, not > Android > (Which is Evgeniy's land. Please make sure the asan-Android wiki is up to > date) > > --kcc > > > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "address-sanitizer" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
