On Thu, 2012-08-02 at 18:21 -0400, Wonjoon Song wrote: ... > > valgrind: the 'impossible' happened: > Killed by fatal signal > ==24479== at 0x38059A25: vgPlain_do_syscall (m_syscall.c:72) > ==24479== by 0x3808E5E1: handle_syscall (scheduler.c:1057) ... > > I tried to search for examples using system call in tools but it seems > they(memcheck, massif, lackey) don't use it. Difficult to see what is going wrong without looking at (some of) the code.
For sure, tools are e.g. calling VG_(getpid) without crashing :). For what concerns mmap, you should not use mmap syscall directly. Instead, you should use the interface of the Valgrind address space manager (i.e. pub_tool_aspacemgr.h). > > > My question is, is it allowed to use system call in a valgrind tool? > Is it recommended not to use system call? If it is allowed to use > system call in a tool, what should I do to make this thing work? You can use syscalls, but you must have the "interface" defined for it. See e.g. m_libcproc.c and similar to see how the "VG(xxxxxx)" are providing the equivalent of the xxxxxx syscall. Philippe ------------------------------------------------------------------------------ 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