A getnev leading to a mlk

P

parag_paul

I saw a invalid read for an getenv code. It that correct

Like the following

==12600==
==12600== Invalid read of size 4
==12600== at 0x7E0BD34: getenv (in /lib/tls/libc-2.3.4.so)
==12600== by 0xA0101AC: XXXXXXXX (virvpirw.cc:273)
==12600== by 0xA665630: YYYYYYYYYYYYY (vpi.c:312)
==12600== by 0xC41B048: mvpi::abcb(mhph*, int)

Is that possible.
What could be the error here in the above one?
-Parag
 
M

Mark McIntyre

I saw a invalid read for an getenv code. It that correct

Like the following

==12600==
==12600== Invalid read of size 4
==12600== at 0x7E0BD34: getenv (in /lib/tls/libc-2.3.4.so)

The problem is not with the getenv in the library, but with some part of
your own code. You don't have enough of that visible, but I would guess
you didn't allocate memory for a string somewhere,
==12600== by 0xC41B048: mvpi::abcb(mhph*, int)

This looks like C++ by the way. And what does mhph point to?
 
P

parag_paul

The problem is not with the getenv in the library, but with some part of
your own code. You don't have enough of that visible, but I would guess
you didn't allocate memory for a string somewhere,


This looks like C++ by the way. And what does mhph point to?

The original is jst a pointer to an internal data strcuture, and does
nothing much by the time we call the getenv call.
 
M

Mark McIntyre

The original is jst a pointer to an internal data strcuture, and does
nothing much by the time we call the getenv call.

You need to show your actual code, or enough of it to clearly identify
the problem area. Ideally, create a small standalone programme that
demonstrates the issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top