> /data # strace valgrind --tool=none ./hello-arm-bionic
   [snip]
> mmap2(0x8000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x8000
> fstat64(3, {st_mode=S_IFREG|0777, st_size=6788, ...}) = 0
> readlink("/proc/self/fd/3", "/data/hello-arm-bionic", 4096) = 22
> mmap2(0x9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1) = 
> 0x9000
> fstat64(3, {st_mode=S_IFREG|0777, st_size=6788, ...}) = 0
> readlink("/proc/self/fd/3", "/data/hello-arm-bionic", 4096) = 22
> write(2, "valgrind: mmap(0x0, 2952865436) "..., 80valgrind: mmap(0x0, 
> 2952865436) failed in UME with error 22 (Invalid argument).

At the lowest level, a request such as mmap(0, 2.9GB, ...) is too large on any 
32-bit system.
There is at most 3GB of user address space (at least 1GB of the 4GB is for the 
operating system);
valgrind and the app must share that 3GB together.  Does the app normally want 
2.9GB?
In general don't count on anything more than 1.2GB or so.

Also, /data/hello-arm-bionic probably is the same as the executable 
./hello-arm-bionic,
so all that readlink() and mmap2() probably are connected with 
execve("/proc/self/exe", ...)
which is known not to work in valgrind.  Instead, find the original name via the
AT_EXECFN tag in Elf32_auxv_t.

-- 

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to