Yes, VALGRIND_MAKE_MEM_DEFINED is the correct solution.
Philippe
On Fri, 2025-04-25 at 03:27 +0530, kiran hardas wrote:
> Hi Team,
>
> Thanks Philippe for your response. I have now used these
> macros VALGRIND_MAKE_MEM_DEFINED after wherever i am attaching to the shared
> memory to
> mark it val
Hi Team,
Thanks Philippe for your response. I have now used these
macros VALGRIND_MAKE_MEM_DEFINED after wherever i am attaching to the
shared memory to mark it valid from valgrind perspective. These shared
memory locations are anyway memsetted to 0 as part of initialisations once
created. With th
If you use some piece of shared memory in a process X and this piece of shared
memory is
initialized by another process Y, valgrind/X has no way to know that process Y
has
initialized this memory.
The typical solution is to have process X marking the memory as initialized just
after it has attac
Hi Team,
Thanks John Reiser for your observations. In continuation of further
valgrind testing, i am seeing below type of errors from my application code
many times (around 200-300 times).
==3534== Invalid write of size 4
==3534==at 0xF5FAD71:
==3534==by 0xF5FAD71:
==3534==by 0xF1F
On 4/14/25 7:13 AM, kiran hardas wrote:
Hi Team,
I haven't received any suggestion or advice to my shmat valgrind wrapper
behaviour mentioned in previous mail.
--- a/valgrind/coregrind/m_syswrap/syswrap-generic.c
+++ b/valgrind/coregrind/m_syswrap/syswrap-generic.c
@@ -2052,7 +2052,7 @@ ML_(
Hi Team,
I haven't received any suggestion or advice to my shmat valgrind wrapper
behaviour mentioned in previous mail.
To proceed ahead I have commented the call to
VG_(am_get_advisory_client_simple) function if shmaddr argument value is
passed as 0.
With this the shmaddr value if 0, will be pass
Hi Team,
Thanks John for your inputs. I have got a few more observations on shmat
failure (invalid argument error) under valgrind after debugging by adding
logs.
As i mentioned earlier, my application code is calling shmat as below
(verifed the arguments)
data = shmat(shmid, NULL, 0);
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
$ /var/run/strace -p 5564 -e shmat
/var/run/strace: Process 5564 attached
/var/run/strace: [ Process PID=5564 runs in 32 bit mode. ]
shmat(0, 0x1fc15000, 0) = 0x1fc15000
shmat(1, 0x1fc15000, 0) = -1 EINVAL (Invalid argument)
shmat(3, 0x1fc15000, 0) =
Hi Team,
Regarding the shmat "invalid argument" error, in continuation of debugging
the issue, I have got further info.
I used strace on my valgrind process id to understand better. It gave the
following output for shmat function calls of my application,
$ /var/run/strace -p 5564 -e shmat
/var/ru
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 wrote:
>
> On 21/03/2025 09:06, kiran harda
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
On 3/21/25 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, s
On 3/12/25 22:40, kiran hardas wrote:
Hi Philippe/Team,
Thank you Philippe for your suggestions, I was able to resolve the
earlier errors by adding additional valgrind options and loading the
symbol table.
In my application, few variables and a function pointer was
uninitialised which led to
Hi Philippe/Team,
Thank you Philippe for your suggestions, I was able to resolve the earlier
errors by adding additional valgrind options and loading the symbol table.
In my application, few variables and a function pointer was uninitialised
which led to previous errors mentioned in earlier email.
Is glibc compiled with debug info ?
Without a way to see where the problem happens in glibc, this will be difficult
to understand.
If/when you have glibc debug info, you might use valgrind --vgdb-error=0 and
debug
glibc startup under valgrind+gdb
Alternatively, you might add -v -v -v -d -d -d to
Yes Philippe, I did try out Valgrind 3.24, but it too gave same error.
Regards,
Kiran H.
On Wed, Jan 29, 2025 at 11:56 PM Philippe Waroquiers <
philippe.waroqui...@skynet.be> wrote:
> The first thing to try is to compile and use a more recent valgrind
> version.
> (3.18 is something like 4 years
The first thing to try is to compile and use a more recent valgrind version.
(3.18 is something like 4 years old while 3.24 is from Oct 24).
Thanks
Philippe
On Wed, 2025-01-29 at 19:03 +0530, kiran hardas wrote:
> Hi Team,
>
> Good Evening,
>
> I need some support in debugging an issue in Valg
Hi Team,
Good Evening,
I need some support in debugging an issue in Valgrind 3.18.
I have an application which I am trying to check with Valgrind tool for
memory issues. I have the valgrind source code which is compiled and built
along with my application using same set of libraries. But while c
19 matches
Mail list logo