> But when same program is executed under valgrind shmat parameters are getting > modified and shmat is failing with errno 22. > > without valgrind ( taken using strace command) > ---------------------------------------------- > shmat(281542719, 0, 0) = ?
> > with valgrind ( taken using strace command) > ---------------------------------------------- > shmat(281542719, 0xf1c0000, 0) = ? Please tell us which hardware and operating system, and which version of valgrind. It matters. In particular, "errno 22" might not be EINVAL on all systems. The second parameter to shmat() is the preferred address, where 0 means "I don't care which address, just give me a good one." In order to manage and track the address space, then valgrind picks what it considers to be a good address, and asks for shmat() at that address. In order to get beyond "errno 22", then we must determine _why_ your system believes that the address is not valid. The particular case of 0x0f1c0000 looks pretty good to me: on a 256 KB boundary, not too large, etc. Why does your system complain? -- ------------------------------------------------------------------------------ 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