About Asan ASAN_MEMORY_ACCESS_CALLBACK_BODY macro

2016-11-28 Thread steven shi
Hello, I'm porting the Asan RT lib to my firmware, and I meet a issue to block my shadow memory checking work correctly. I have to update the Asan core logic macro to let it works in my side, and I hope some expert could help me understand below code correctly. LLVM Asan use below macro to

Re: About Asan ASAN_MEMORY_ACCESS_CALLBACK_BODY macro

2016-11-28 Thread 'Dmitry Vyukov' via address-sanitizer
On Mon, Nov 28, 2016 at 3:06 PM, steven shi wrote: > Hello, > I'm porting the Asan RT lib to my firmware, and I meet a issue to block my > shadow memory checking work correctly. I have to update the Asan core logic > macro to let it works in my side, and I hope some expert

Re: ASN for MIPS with either clang or gcc

2016-11-28 Thread Park Kit
Hi Maxim, You're right. Have managed to have ASAN in build step. Very appreciated for your advice up until now. However, found two things to check: 1. You said you used GCC trunk and I am trying out GCC 4.8.2. See differences between them in applying patches you sent and build error such as

Re: ASN for MIPS with either clang or gcc

2016-11-28 Thread Park Kit
Ah, sorry for that since I have missed that. Will give it try and update you on that. Many thanks, Kit https://kitpark.slack.com/ -- Sorry for a terse reply or typo as sent from a mobile. 2016-11-28 14:42 GMT+00:00 Maxim Ostapenko : > > > 2016-11-28 17:38 GMT+03:00 Park

Re: ASN for MIPS with either clang or gcc

2016-11-28 Thread Park Kit
Hi Maxim, Once done 3) make - j12 from step 3, run 'make install' which is different from step 2 in the reference. Have set rpath to dismiss link errors: /home/NDS-UK/kyoupark/asn/install-4.8.2/bin/../lib/gcc/mips-linux/4.8.2/../../../../mips-linux/bin/ld: warning: libpthread.so.0, needed by

Re: ASN for MIPS with either clang or gcc

2016-11-28 Thread Maxim Ostapenko
2016-11-28 17:38 GMT+03:00 Park Kit : > Hi Maxim, > > Once done 3) make - j12 from step 3, run 'make install' which is different > from step 2 in the reference. Have set rpath to dismiss link errors: > > /home/NDS-UK/kyoupark/asn/install-4.8.2/bin/../lib/gcc/ >

Re: About Asan ASAN_MEMORY_ACCESS_CALLBACK_BODY macro

2016-11-28 Thread steven shi
Dmitry, thank you response. I'd like to use a example to invite you help me clarify this magic more clearly. Thank your patience. Below simple code has a global variable buffer overflow in line 6, and the Asan can correctly detect and report it. In this case, Asan use __asan_report_store4

Re: About Asan ASAN_MEMORY_ACCESS_CALLBACK_BODY macro

2016-11-28 Thread steven shi
OK, I think I understand now. The (s8) is the key. It force cast the 0xf9 value to a signed negative char which is less than 3. Thank you anyway! -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop