Hi Paul, Thanks for taking time and providing inputs. I am still debugging for that shmat failure, so far no rca. The error string that i got from perror after shmat is "Invalid argument".
Regards, Kiran H. On Sat, Mar 22, 2025 at 2:18 AM Paul Floyd <pjfl...@wanadoo.fr> wrote: > > On 21/03/2025 09:06, kiran hardas wrote: > > Hi Paul/Team, > > > > Thank you for your suggestion. I added the entry for shmget function > > in coregrind/m_syswrap/syswrap-x86-linux.c > > and the error got resolved for shmget function. Yes it is x86 linux > > that is getting used. Similar errors came for shmat, shmdt, shmctl > > functions. > > I added similar entries of those functions too in the table and > > resolved the errors. > > > > Currently i am getting error from shmat function as "Invalid argument" > > from my application code. > > The data pointer returned by shmat function is coming as 0xffffffff > > which is -1 (error). I am calling the shmat as below > > in my application code > > > > data = shmat(shmid, NULL, 0); /* where data is a struct > > pointer and shmid is 1 obtained by a successful shmget call */ > > > > I verified the arguments for this shmat function and they seem to be > > fine. Also checked for permission issues. > > I am suspecting memory issue which could be resulting in shmat attach > > failure after running valgrind (have glibc 2.40). > > > > Would appreciate any advice/suggestion you can provide for this issue. > > > > Hi > > On the Valgrind side I've pushed a change that adds these 4 syscalls to > x86 Linux. > > I can't tell why your shmat call is failing. If the shmget call to > obtain shmid works than it ought to work. The man page lists the error > conditions. What do you get in errno? > > It might be worth checking with the ipcs command to see if hou have lots > of leftover memorys/queues/semaphores. > > > A+ > > Paul > >
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users