mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
The replacement functions are running on the simulated CPU. The code on the simulated CPU does not necessarily use all arguments. E.g. args can be ignored and/or only given to a NON SIMD call. The definedness of such 'unused' arguments will not be verified by memcheck. A call to 'trigger_memcheck_error_if_undefined' allows memcheck to detect such errors for the otherwise unused args. Apart of allowing memcheck to detect an error, the function trigger_memcheck_error_if_undefined has no effect and has a minimal cost for other tools replacing malloc functions. (suggestion of the 'no operation check' from Julian). tested on f12/x86, debian6/amd64, f18/ppc64 Note that some Darwin specific code has been modified in coregrind/m_replace_malloc/vg_replace_malloc.c. (Some of) this code has not been compiled (no access to a Darwin system). The code changed is trivial, so there is some chance it will compile and even maybe work. Added a new test verifying that various malloc related functions undefined args are triggering an error in memcheck. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13361
3 lines
52 B
Plaintext
3 lines
52 B
Plaintext
vgopts: --leak-check=yes -q
|
|
prog: undef_malloc_args
|