> (void*)(u32)(sz_ptr); in 64bit platform!

> So,Is there a way to make valgrind replace malloc allocate memory less than 
> 4G?

No.  There is no command-line parameter, environment variable, etc. that
will restrict allocations to have an address which is < 4G.  In order
to implement such a restriction, then you would have to modify the valgrind
code that is inside the replace malloc machinery. One possibility is to use
the MAP_32BIT flag of mmap(), but this would require the cooperation of
valgrind's address space manager.  Probably it would be easier fix the
bug in "(void*)(u32)(sz_ptr)".  Be happy that valgrind found that bug for you!
It really is a bug; the app could start failing at any time (any upgrade
to glibc, the linux kernel, any shared library used by the app, etc.)
even without running valgrind.

-- 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to