Hi
   I can not access svn address that you show me. Can you show the code you 
modify, and I merge it .

BR
Owen

-----邮件原件-----
发件人: Philippe Waroquiers [mailto:philippe.waroqui...@skynet.be] 
发送时间: 2017年4月20日 4:23
收件人: Wuweijia <wuwei...@huawei.com>
抄送: valgrind-users@lists.sourceforge.net; Fanbohao <fanbo...@huawei.com>
主题: Re: 答复: [Valgrind-users] [Help] I run test application throght the massif 
with --pages-as-heap, it failed. But I run the same application throught the 
massif with no --pages-as-heap, it is ok.why?

On Tue, 2017-04-18 at 02:33 +0000, Wuweijia wrote:
> Hi Philippe:
>   This is the android project.
>   
>   No matter the LD_PRELOAD , the valgrind always failed. The output is the 
> same.
>   
>   I do not want to set it , I just try it when run the massif failed with 
> --pages-as-heap and no LD_PRELOAD.
> 
>   I can not access web address. So can you help me to create a bug report and 
> analyze it .

Looking at the traces you have sent, we see that in the working run, we have 2 
successive open syscalls:
run_with_page_as_heap_no.log:381:SYSCALL[25925,1](56) sys_openat ( 4294967196, 
0x494d050(/system/lib64/valgrind/vgpreload_core-arm64-linux.so), 524288 ) --> 
[async] ... 
run_with_page_as_heap_no.log:412:SYSCALL[25925,1](56) sys_openat ( 4294967196, 
0x494d090(/system/lib64/valgrind/vgpreload_massif-arm64-linux.so), 524288 ) --> 
[async] ... 

the failed run contains:
run_with_page_as_heap_yes.log:2063:SYSCALL[25913,1](56) sys_openat ( 
4294967196, 0x494d050(/system/lib64/valgrind/vgpreload_core-arm64-linux.so), 
524288 ) --> [async] ... 
run_with_page_as_heap_yes.log:2139:SYSCALL[25913,1](56) sys_openat ( 
4294967196, 0xffeffe908(/system/lib64/), 524288 ) --> [async] ... 

Massif uses a hack to remove vgpreload_massif-arm64-linux.so from the 
LD_PRELOAD, by replacing the full entry with spaces.
I am guessing that on android, the dynamic linker tries to open such an 'all 
spaces' entry by appending it to a system lib path, causing then the open 
syscall to fail and cause a dynamic linking error.

I have reworked the way vgpreload_massif-arm64-linux.so is removed from 
LD_PRELOAD, as part of revision 16306, so that the entry is really removed, 
rather than replaced with spaces.

Can you get + compile + test the SVN version ?
(see http://www.valgrind.org/downloads/repository.html
to get the SVN version, README.android indicates how to build for android)

Thanks

Philippe


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to