1. I'm trying to understand VALGRIND_DISCARD(addr, size) client request. My understanding is that it will suppress any errors related to specified address range.
addr = mmap(..., 0x10, ...); VALGRIND_DISCARD(VALGRIND_MAKE_MEM_NOACCESS(addr, 0x10)); memset(addr, 1, 0x1); I thought above code will not report any error messages. But there is invalid write error. 2. VALGRIND_MAKE_MEM_NOACCESS(DEFINED,UNDEFINED) - suppose to return block handle - return zero when not run on valgrind - I got -1 for all three macros (is -1 valid?) VALGRIND_DISCARD return - 0: valid handle - 1: invalid handle - always return 1 because above 3 macro return -1 OS: Ubuntu 9.04 on vmware Valgrind: valgrind-3.4.1-Debian Thank you Sean -- View this message in context: http://old.nabble.com/Q%3A-VALGRIND_DISCARD-%28can%27t-understand-how-to-use%29-tp26287371p26287371.html Sent from the Valgrind - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
