libc6: dlerror valgrind error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
valgrind (Debian) |
Fix Released
|
Unknown
|
|||
valgrind (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Automatically imported from Debian bug report #297798 http://
Debian Bug Importer (debzilla) wrote : | #1 |
Debian Bug Importer (debzilla) wrote : | #2 |
Message-Id: <email address hidden>
Date: Thu, 03 Mar 2005 00:31:39 +0100
From: wim delvaux <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: libc6: dlerror valgrind error
Package: libc6
Version: 2.3.2.ds1-20
Severity: critical
Justification: breaks unrelated software
the following statement
AC_RaiseExc( AC_Critical, AC_For(Myself),
"Cannot load PEX %s of %s : %s",
Fn, Name, dlerror() );
which basically serves as a printf
gives following valgrind error
==8220== Invalid read of size 1
==8220== at 0x1B906788: strlen (mac_replace_
==8220== by 0x1C0EB249: AC_vfnprintf (fnprintf_A.c:299)
==8220== by 0x1C0EAB39: AC_vfdprintf (fdprintf_A.c:9)
==8220== by 0x1C0EA02D: AC_VLog (ActivatorError
==8220== by 0x1C0EA3EC: AC_VRaiseExc (ActivatorError
==8220== by 0x1C0EA559: AC_RaiseExc (ActivatorError
==8220== by 0x1C5FDA8D: Repo2Pex_Load (PEX_A.c:35)
==8220== by 0x1B9192DA: Repo2Mgr_
==8220== by 0x1B90CADE: TOREPO_
==8220== by 0x1B90E8A9: ILoadComponent (StdRootManager
==8220== by 0x1B90F763: CheckCompRefQuality (StdRootManager
==8220== by 0x1B910DC8: FindBehavior (StdRootManager
==8220== by 0x1B9128BD: Wrap_FindBehavior (StdRootManager
==8220== by 0x1C0EBF42: AC_FindBehavior
==8220== by 0x804866D: main (main.c:8)
==8220== Address 0x1C4F5E58 is 0 bytes inside a block of size 74 free'd
==8220== at 0x1B907460: free (vg_replace_
==8220== by 0x1C1284FA: _dlerror_run (dlerror.c:140)
==8220== by 0x1C128153: dlsym (dlsym.c:51)
==8220== by 0x1C0FE263: write (vg_libpthread.
==8220== by 0x1C0EFF1D: AC_WriteExt (ActivatorIo_
==8220== by 0x1C0EAAF8: AC_WriteToFd (fdprintf_A.c:4)
==8220== by 0x1C0EACAC: fmtout (fnprintf_A.c:63)
==8220== by 0x1C0EB8A9: AC_vfnprintf (fnprintf_A.c:506)
==8220== by 0x1C0EAB39: AC_vfdprintf (fdprintf_A.c:9)
==8220== by 0x1C0EAB70: AC_fdprintf (fdprintf_A.c:17)
==8220== by 0x1C0E9FB0: AC_VLog (ActivatorError
==8220== by 0x1C0EA3EC: AC_VRaiseExc (ActivatorError
==8220== by 0x1C0EA559: AC_RaiseExc (ActivatorError
==8220== by 0x1C5FDA8D: Repo2Pex_Load (PEX_A.c:35)
==8220== by 0x1B9192DA: Repo2Mgr_
==8220== by 0x1B90CADE: TOREPO_
==8220== by 0x1B90E8A9: ILoadComponent (StdRootManager
==8220== by 0x1B90F763: CheckCompRefQuality (StdRootManager
==8220== by 0x1B910DC8: FindBehavior (StdRootManager
==8220== by 0x1B9128BD: Wrap_FindBehavior (StdRootManager
==8220==
if i interpret this correctly then dlsym (used somewhere in the write
function of valgrind), causes a free of the return string of a
dlerror() which is still needed by my application because it wants
to printf it.
if that free occ...
In Debian Bug tracker #297798, Daniel Jacobowitz (drow) wrote : Re: Bug#297798: libc6: dlerror valgrind error | #3 |
On Thu, Mar 03, 2005 at 12:31:39AM +0100, wim delvaux wrote:
> Package: libc6
> Version: 2.3.2.ds1-20
> Severity: critical
> Justification: breaks unrelated software
That's not "unrelated" software, you're using libc6. By that
justification every bug in a library is critical.
> if i interpret this correctly then dlsym (used somewhere in the write
> function of valgrind), causes a free of the return string of a
> dlerror() which is still needed by my application because it wants
> to printf it.
>
> if that free occurs all the time it might break other applications too.
Sounds like a bug in valgrind. dlerror's result is only guaranteed
until the next call to a dl* function.
--
Daniel Jacobowitz
CodeSourcery, LLC
Debian Bug Importer (debzilla) wrote : | #4 |
Message-ID: <email address hidden>
Date: Thu, 3 Mar 2005 09:34:16 -0500
From: Daniel Jacobowitz <email address hidden>
To: wim delvaux <email address hidden>, <email address hidden>
Subject: Re: Bug#297798: libc6: dlerror valgrind error
On Thu, Mar 03, 2005 at 12:31:39AM +0100, wim delvaux wrote:
> Package: libc6
> Version: 2.3.2.ds1-20
> Severity: critical
> Justification: breaks unrelated software
That's not "unrelated" software, you're using libc6. By that
justification every bug in a library is critical.
> if i interpret this correctly then dlsym (used somewhere in the write
> function of valgrind), causes a free of the return string of a
> dlerror() which is still needed by my application because it wants
> to printf it.
>
> if that free occurs all the time it might break other applications too.
Sounds like a bug in valgrind. dlerror's result is only guaranteed
until the next call to a dl* function.
--
Daniel Jacobowitz
CodeSourcery, LLC
In Debian Bug tracker #297798, Justin Pryzby (justinpryzby-users) wrote : valgrind error | #5 |
Hi,
Could you expand on the Debian bug #297798 which you reported against
libc6? It seems like you mean that applications using dlerror() break
when invoked by valgrind, because valgrind dlsym() frees its return
pointer. Is that a correct interpretation?
Thanks,
Justin
Debian Bug Importer (debzilla) wrote : | #6 |
Message-ID: <20050305172303
Date: Sat, 5 Mar 2005 12:23:03 -0500
From: Justin Pryzby <email address hidden>
To: <email address hidden>
Subject: valgrind error
Hi,
Could you expand on the Debian bug #297798 which you reported against
libc6? It seems like you mean that applications using dlerror() break
when invoked by valgrind, because valgrind dlsym() frees its return
pointer. Is that a correct interpretation?
Thanks,
Justin
In Debian Bug tracker #297798, Pierre van den Oord (pierre-pckennis) wrote : Re: Bug#297798: valgrind error | #7 |
Dear Justin,
Maybe you can help me out, I'm trying to get rid of this
bugmailing-list, it seems i'm receiving all kind of bugs. I can't find
the command to send to the list to stop my subscription. Can you help me
out?
Groet,
Pierre
Mail: <email address hidden>
MSN : <email address hidden>
ICQ : 68821143
Justin Pryzby wrote:
> Hi,
>
> Could you expand on the Debian bug #297798 which you reported against
> libc6? It seems like you mean that applications using dlerror() break
> when invoked by valgrind, because valgrind dlsym() frees its return
> pointer. Is that a correct interpretation?
>
> Thanks,
> Justin
>
>
In Debian Bug tracker #297798, u19809 (wim-delvaux) wrote : | #8 |
On Saturday 05 March 2005 18:23, Justin Pryzby wrote:
> Hi,
>
> Could you expand on the Debian bug #297798 which you reported against
> libc6? It seems like you mean that applications using dlerror() break
> when invoked by valgrind, because valgrind dlsym() frees its return
> pointer. Is that a correct interpretation?
yes, that is correct ... (anyway that is what the guys from libc6 support tell
me that happens).
the following statement
AC_RaiseExc( AC_Critical, AC_For(Myself),
"Cannot load PEX %s of %s : %s",
Fn, Name, dlerror() );
which basically serves as a printf
gives following valgrind error
==8220== Invalid read of size 1
==8220== at 0x1B906788: strlen (mac_replace_
==8220== by 0x1C0EB249: AC_vfnprintf (fnprintf_A.c:299)
==8220== by 0x1C0EAB39: AC_vfdprintf (fdprintf_A.c:9)
==8220== by 0x1C0EA02D: AC_VLog (ActivatorError
==8220== by 0x1C0EA3EC: AC_VRaiseExc (ActivatorError
==8220== by 0x1C0EA559: AC_RaiseExc (ActivatorError
==8220== by 0x1C5FDA8D: Repo2Pex_Load (PEX_A.c:35)
==8220== by 0x1B9192DA: Repo2Mgr_
(P_Repo2Manager
==8220== by 0x1B90CADE: TOREPO_
==8220== by 0x1B90E8A9: ILoadComponent (StdRootManager
==8220== by 0x1B90F763: CheckCompRefQuality (StdRootManager
==8220== by 0x1B910DC8: FindBehavior (StdRootManager
==8220== by 0x1B9128BD: Wrap_FindBehavior (StdRootManager
==8220== by 0x1C0EBF42: AC_FindBehavior
==8220== by 0x804866D: main (main.c:8)
==8220== Address 0x1C4F5E58 is 0 bytes inside a block of size 74 free'd
==8220== at 0x1B907460: free (vg_replace_
==8220== by 0x1C1284FA: _dlerror_run (dlerror.c:140)
==8220== by 0x1C128153: dlsym (dlsym.c:51)
==8220== by 0x1C0FE263: write (vg_libpthread.
==8220== by 0x1C0EFF1D: AC_WriteExt (ActivatorIo_
==8220== by 0x1C0EAAF8: AC_WriteToFd (fdprintf_A.c:4)
==8220== by 0x1C0EACAC: fmtout (fnprintf_A.c:63)
==8220== by 0x1C0EB8A9: AC_vfnprintf (fnprintf_A.c:506)
==8220== by 0x1C0EAB39: AC_vfdprintf (fdprintf_A.c:9)
==8220== by 0x1C0EAB70: AC_fdprintf (fdprintf_A.c:17)
==8220== by 0x1C0E9FB0: AC_VLog (ActivatorError
==8220== by 0x1C0EA3EC: AC_VRaiseExc (ActivatorError
==8220== by 0x1C0EA559: AC_RaiseExc (ActivatorError
==8220== by 0x1C5FDA8D: Repo2Pex_Load (PEX_A.c:35)
==8220== by 0x1B9192DA: Repo2Mgr_
(P_Repo2Manager
==8220== by 0x1B90CADE: TOREPO_
==8220== by 0x1B90E8A9: ILoadComponent (StdRootManager
==8220== by 0x1B90F763: CheckCompRefQuality (StdRootManager
==8220== by 0x1B910DC8: FindBehavior (StdRootManager
==8220== by 0x1B9128BD: Wrap_FindBehavior (StdRootManager
==8220==
if i interpret this correctly then dlsym (used somewhere in the write
function of valgrind), causes a free of the return string of a
dlerror() which is still needed by my app...
Debian Bug Importer (debzilla) wrote : | #9 |
Message-ID: <email address hidden>
Date: Sat, 05 Mar 2005 19:01:48 +0100
From: Pierre van den Oord <email address hidden>
To: Justin Pryzby <email address hidden>,
<email address hidden>
Subject: Re: Bug#297798: valgrind error
Dear Justin,
Maybe you can help me out, I'm trying to get rid of this
bugmailing-list, it seems i'm receiving all kind of bugs. I can't find
the command to send to the list to stop my subscription. Can you help me
out?
Groet,
Pierre
Mail: <email address hidden>
MSN : <email address hidden>
ICQ : 68821143
Justin Pryzby wrote:
> Hi,
>
> Could you expand on the Debian bug #297798 which you reported against
> libc6? It seems like you mean that applications using dlerror() break
> when invoked by valgrind, because valgrind dlsym() frees its return
> pointer. Is that a correct interpretation?
>
> Thanks,
> Justin
>
>
Debian Bug Importer (debzilla) wrote : | #10 |
Message-Id: <email address hidden>
Date: Sat, 5 Mar 2005 19:24:19 +0100
From: wim delvaux <email address hidden>
To: Justin Pryzby <email address hidden>,
<email address hidden>
Subject: Re: Bug#297798: valgrind error
On Saturday 05 March 2005 18:23, Justin Pryzby wrote:
> Hi,
>
> Could you expand on the Debian bug #297798 which you reported against
> libc6? It seems like you mean that applications using dlerror() break
> when invoked by valgrind, because valgrind dlsym() frees its return
> pointer. Is that a correct interpretation?
yes, that is correct ... (anyway that is what the guys from libc6 support tell
me that happens).
the following statement
AC_RaiseExc( AC_Critical, AC_For(Myself),
"Cannot load PEX %s of %s : %s",
Fn, Name, dlerror() );
which basically serves as a printf
gives following valgrind error
==8220== Invalid read of size 1
==8220== at 0x1B906788: strlen (mac_replace_
==8220== by 0x1C0EB249: AC_vfnprintf (fnprintf_A.c:299)
==8220== by 0x1C0EAB39: AC_vfdprintf (fdprintf_A.c:9)
==8220== by 0x1C0EA02D: AC_VLog (ActivatorError
==8220== by 0x1C0EA3EC: AC_VRaiseExc (ActivatorError
==8220== by 0x1C0EA559: AC_RaiseExc (ActivatorError
==8220== by 0x1C5FDA8D: Repo2Pex_Load (PEX_A.c:35)
==8220== by 0x1B9192DA: Repo2Mgr_
(P_Repo2Manager
==8220== by 0x1B90CADE: TOREPO_
==8220== by 0x1B90E8A9: ILoadComponent (StdRootManager
==8220== by 0x1B90F763: CheckCompRefQuality (StdRootManager
==8220== by 0x1B910DC8: FindBehavior (StdRootManager
==8220== by 0x1B9128BD: Wrap_FindBehavior (StdRootManager
==8220== by 0x1C0EBF42: AC_FindBehavior
==8220== by 0x804866D: main (main.c:8)
==8220== Address 0x1C4F5E58 is 0 bytes inside a block of size 74 free'd
==8220== at 0x1B907460: free (vg_replace_
==8220== by 0x1C1284FA: _dlerror_run (dlerror.c:140)
==8220== by 0x1C128153: dlsym (dlsym.c:51)
==8220== by 0x1C0FE263: write (vg_libpthread.
==8220== by 0x1C0EFF1D: AC_WriteExt (ActivatorIo_
==8220== by 0x1C0EAAF8: AC_WriteToFd (fdprintf_A.c:4)
==8220== by 0x1C0EACAC: fmtout (fnprintf_A.c:63)
==8220== by 0x1C0EB8A9: AC_vfnprintf (fnprintf_A.c:506)
==8220== by 0x1C0EAB39: AC_vfdprintf (fdprintf_A.c:9)
==8220== by 0x1C0EAB70: AC_fdprintf (fdprintf_A.c:17)
==8220== by 0x1C0E9FB0: AC_VLog (ActivatorError
==8220== by 0x1C0EA3EC: AC_VRaiseExc (ActivatorError
==8220== by 0x1C0EA559: AC_RaiseExc (ActivatorError
==8220== by 0x1C5FDA8D: Repo2Pex_Load (PEX_A.c:35)
==8220== by 0x1B9192DA: Repo2Mgr_
(P_Repo2Manager
==8220== by 0x1B90CADE: TOREPO_
==8220== by 0x1B90E8A9: ILoadComponent (StdRootManager
==8220== by 0x1B90F763: CheckCompRefQuality (StdRootManager
==8220== by 0x1B910DC8: FindBehavio...
Matt Zimmerman (mdz) wrote : | #11 |
Jeff, is this something we should be concerned about for Hoary?
In Debian Bug tracker #297798, Justin Pryzby (justinpryzby-users) wrote : valgrind test case | #12 |
Have you tried to construct a minimal test case?
I tried to reproduce the problem with a trivial program, included.
Let me know if I'm missing something already known.
Thanks,
Justin
References
Debian Bug Importer (debzilla) wrote : | #13 |
Message-ID: <20050307171518
Date: Mon, 7 Mar 2005 12:15:18 -0500
From: Justin Pryzby <email address hidden>
To: <email address hidden>
Subject: valgrind test case
--9jxsPFA5p3P2qPhR
Content-Type: text/plain; charset=us-ascii
Content-
Have you tried to construct a minimal test case?
I tried to reproduce the problem with a trivial program, included.
Let me know if I'm missing something already known.
Thanks,
Justin
References
[0] http://
--9jxsPFA5p3P2qPhR
Content-Type: text/x-csrc; charset=us-ascii
Content-
#include <dlfcn.h>
#include <stdio.h>
print(char *s)
{
fprintf(stderr, "%s\n", s);
}
int main()
{
void *v=dlopen("/", RTLD_LAZY);
print(dlerror());
//void *dlsym(void *handle, const char *symbol);
//int dlclose(void *handle);
return 0;
}
--9jxsPFA5p3P2q
In Debian Bug tracker #297798, u19809 (wim-delvaux) wrote : Re: Bug#297798: valgrind test case | #14 |
On Monday 07 March 2005 18:15, Justin Pryzby wrote:
> Have you tried to construct a minimal test case?
>
> I tried to reproduce the problem with a trivial program, included.
> Let me know if I'm missing something already known.
>
> Thanks,
> Justin
>
> References
>
> [0] http://
It seems the problem only occurs when the library has a missing symbol and not
when it is not found.
I have changed the vg.c as such ...
#include <dlfcn.h>
#include <stdio.h>
print(char *s)
{
fprintf(stderr, "%s\n", s);
}
int main()
{
void*v=
printf("%s\n", dlerror());
//void *dlsym(void *handle, const char *symbol);
//int dlclose(void *handle);
return 0;
}
where xyz.so is an existing library with a missing symbol
I tried with one of my own libs (which I molested a bit) and got the following
valgrind error
u19809@
==19655== Memcheck, a memory error detector for x86-linux.
==19655== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==19655== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==19655== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==19655== For more details, rerun with: -v
==19655==
==19655== Invalid read of size 1
==19655== at 0x1B90C2E7: dlerror (dlerror.c:78)
==19655== by 0x80484E3: main (in /tmp/vg)
==19655== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==19655==
==19655== ---- Attach to debugger ? --- [Return/
==19655==
==19655== Process terminating with default action of signal 11 (SIGSEGV)
==19655== Access not within mapped region at address 0x0
==19655== at 0x1B90C2E7: dlerror (dlerror.c:78)
==19655== by 0x80484E3: main (in /tmp/vg)
==19655==
==19655== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 23 from 1)
==19655== malloc/free: in use at exit: 964 bytes in 5 blocks.
==19655== malloc/free: 17 allocs, 12 frees, 3374 bytes allocated.
==19655== For a detailed leak analysis, rerun with: --leak-check=yes
==19655== For counts of detected errors, rerun with: -v
running without val yields ... (long path is what I used for xxx.so ... don't
let the pex extension fool you)
u19809@
/mnt/buro/
undefined symbol: AC_d_sprintf
Debian Bug Importer (debzilla) wrote : | #15 |
Message-Id: <email address hidden>
Date: Tue, 8 Mar 2005 00:26:43 +0100
From: wim delvaux <email address hidden>
To: Justin Pryzby <email address hidden>,
<email address hidden>
Subject: Re: Bug#297798: valgrind test case
On Monday 07 March 2005 18:15, Justin Pryzby wrote:
> Have you tried to construct a minimal test case?
>
> I tried to reproduce the problem with a trivial program, included.
> Let me know if I'm missing something already known.
>
> Thanks,
> Justin
>
> References
>
> [0] http://
It seems the problem only occurs when the library has a missing symbol and not
when it is not found.
I have changed the vg.c as such ...
#include <dlfcn.h>
#include <stdio.h>
print(char *s)
{
fprintf(stderr, "%s\n", s);
}
int main()
{
void*v=
printf("%s\n", dlerror());
//void *dlsym(void *handle, const char *symbol);
//int dlclose(void *handle);
return 0;
}
where xyz.so is an existing library with a missing symbol
I tried with one of my own libs (which I molested a bit) and got the following
valgrind error
u19809@
==19655== Memcheck, a memory error detector for x86-linux.
==19655== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==19655== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==19655== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==19655== For more details, rerun with: -v
==19655==
==19655== Invalid read of size 1
==19655== at 0x1B90C2E7: dlerror (dlerror.c:78)
==19655== by 0x80484E3: main (in /tmp/vg)
==19655== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==19655==
==19655== ---- Attach to debugger ? --- [Return/
==19655==
==19655== Process terminating with default action of signal 11 (SIGSEGV)
==19655== Access not within mapped region at address 0x0
==19655== at 0x1B90C2E7: dlerror (dlerror.c:78)
==19655== by 0x80484E3: main (in /tmp/vg)
==19655==
==19655== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 23 from 1)
==19655== malloc/free: in use at exit: 964 bytes in 5 blocks.
==19655== malloc/free: 17 allocs, 12 frees, 3374 bytes allocated.
==19655== For a detailed leak analysis, rerun with: --leak-check=yes
==19655== For counts of detected errors, rerun with: -v
running without val yields ... (long path is what I used for xxx.so ... don't
let the pex extension fool you)
u19809@
/mnt/buro/
undefined symbol: AC_d_sprintf
In Debian Bug tracker #297798, Steve Langasek (vorlon) wrote : reassign 297798 to valgrind, severity of 297798 is important | #16 |
# Automatically generated email from bts, devscripts version 2.8.10
reassign 297798 valgrind
severity 297798 important
Debian Bug Importer (debzilla) wrote : | #17 |
Message-Id: <email address hidden>
Date: Tue, 8 Mar 2005 03:02:19 -0800
From: Steve Langasek <email address hidden>
To: <email address hidden>
Subject: reassign 297798 to valgrind, severity of 297798 is important
# Automatically generated email from bts, devscripts version 2.8.10
reassign 297798 valgrind
severity 297798 important
In Debian Bug tracker #297798, GOTO Masanori (gotom-debian) wrote : Re: Bug#297798: libc6: dlerror valgrind error | #18 |
reassign 297798 valgrind
severity 297798 normal
thanks
At Thu, 3 Mar 2005 09:34:16 -0500,
Daniel Jacobowitz wrote:
> On Thu, Mar 03, 2005 at 12:31:39AM +0100, wim delvaux wrote:
> > Package: libc6
> > Version: 2.3.2.ds1-20
> > Severity: critical
> > Justification: breaks unrelated software
>
> That's not "unrelated" software, you're using libc6. By that
> justification every bug in a library is critical.
I agreed. I downgrade it to normal.
> > if i interpret this correctly then dlsym (used somewhere in the write
> > function of valgrind), causes a free of the return string of a
> > dlerror() which is still needed by my application because it wants
> > to printf it.
> >
> > if that free occurs all the time it might break other applications too.
>
> Sounds like a bug in valgrind. dlerror's result is only guaranteed
> until the next call to a dl* function.
Maybe so.
I reassigned it to valgrind package. Valgrind maintainer, please look
at it. If you find it's glibc related problem, please reassign it
back to us.
Regards,
-- gotom
Debian Bug Importer (debzilla) wrote : | #19 |
Message-ID: <email address hidden>
Date: Wed, 09 Mar 2005 16:56:03 +0900
From: GOTO Masanori <email address hidden>
To: Daniel Jacobowitz <email address hidden>, <email address hidden>
Cc: wim delvaux <email address hidden>,
<email address hidden>, <email address hidden>
Subject: Re: Bug#297798: libc6: dlerror valgrind error
reassign 297798 valgrind
severity 297798 normal
thanks
At Thu, 3 Mar 2005 09:34:16 -0500,
Daniel Jacobowitz wrote:
> On Thu, Mar 03, 2005 at 12:31:39AM +0100, wim delvaux wrote:
> > Package: libc6
> > Version: 2.3.2.ds1-20
> > Severity: critical
> > Justification: breaks unrelated software
>
> That's not "unrelated" software, you're using libc6. By that
> justification every bug in a library is critical.
I agreed. I downgrade it to normal.
> > if i interpret this correctly then dlsym (used somewhere in the write
> > function of valgrind), causes a free of the return string of a
> > dlerror() which is still needed by my application because it wants
> > to printf it.
> >
> > if that free occurs all the time it might break other applications too.
>
> Sounds like a bug in valgrind. dlerror's result is only guaranteed
> until the next call to a dl* function.
Maybe so.
I reassigned it to valgrind package. Valgrind maintainer, please look
at it. If you find it's glibc related problem, please reassign it
back to us.
Regards,
-- gotom
In Debian Bug tracker #297798, Justin Pryzby (justinpryzby-users) wrote : valgrind error | #20 |
Okay,
Still trying to make sure I understand precisely what you're doing.
It seems like you have a shared object called
/mnt/
which contains an undefined symbol.
file /mnt/buro/
should say
ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
or something very similar. Right?
And you are using
void *v=dlopen(
Thanks,
Justin
References
Jeff Bailey (jbailey) wrote : | #21 |
Downgrading severity to match lowered severity in Debian. Will watch to see if
valgrind problems solves it.
Debian Bug Importer (debzilla) wrote : | #22 |
Message-ID: <20050309171435
Date: Wed, 9 Mar 2005 12:14:35 -0500
From: Justin Pryzby <email address hidden>
To: <email address hidden>
Subject: valgrind error
Okay,
Still trying to make sure I understand precisely what you're doing.
It seems like you have a shared object called
/mnt/
which contains an undefined symbol.
file /mnt/buro/
should say
ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
or something very similar. Right?
And you are using
void *v=dlopen(
Thanks,
Justin
References
In Debian Bug tracker #297798, Andrés Roldán (aroldan) wrote : Unreproducible | #23 |
Hi, I still can't reproduce this bug using the latest versions
of libc6 and valgrind available on Debian. This is what I did:
aroldan@volatile:~% cat xyz.c
#include <stdio.h>
int
main()
{
something();
}
aroldan@volatile:~% cc -o xyz.so -shared xyz.c
aroldan@volatile:~% cat a.c
#include <dlfcn.h>
#include <stdio.h>
print(char *s)
{
fprintf(stderr, "%s\n", s);
}
int main()
{
void*v=
printf("%s\n", dlerror());
//void *dlsym(void *handle, const char *symbol);
//int dlclose(void *handle);
return 0;
}
aroldan@volatile:~% cc -o a a.c -ldl
aroldan@volatile:~% ./a
./xyz.so: undefined symbol: something
aroldan@volatile:~% valgrind.bin --tool=memcheck ./a
==9779== Memcheck, a memory error detector for x86-linux.
==9779== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==9779== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==9779== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==9779== For more details, rerun with: -v
==9779==
/xyz.so: undefined symbol: something
==9779==
==9779== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 from 1)
==9779== malloc/free: in use at exit: 0 bytes in 0 blocks.
==9779== malloc/free: 9 allocs, 9 frees, 1007 bytes allocated.
==9779== For a detailed leak analysis, rerun with: --leak-check=yes
==9779== For counts of detected errors, rerun with: -v
aroldan@volatile:~% dpkg -l valgrind libc6
Desired=
| Estado=
|/ Err?=(none)
||/ Nombre Versión Descripción
+++-===
ii valgrind 2.2.0-4 A memory debugger for x86-linux
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries and Timezone data
--
Andrés Roldán
<email address hidden> / Fluidsignal Group S.A.
<email address hidden> / The Debian Project
Mobile: +57 300-7920981
GPG F/P: 0EE9 27C9 55F1 92E4 3809 B852 D8E0 724B B293 96EB
http://
Debian Bug Importer (debzilla) wrote : | #24 |
Message-ID: <email address hidden>
Date: Wed, 09 Mar 2005 14:09:44 -0500
From: =?iso-8859-
To: <email address hidden>
Subject: Unreproducible
Hi, I still can't reproduce this bug using the latest versions
of libc6 and valgrind available on Debian. This is what I did:
aroldan@volatile:~% cat xyz.c
#include <stdio.h>
int
main()
{
something();
}
aroldan@volatile:~% cc -o xyz.so -shared xyz.c=20=
aroldan@volatile:~% cat a.c
#include <dlfcn.h>
#include <stdio.h>
print(char *s)
{
fprintf(stderr, "%s\n", s);
}
int main()
{
void*v=
printf("%s\n", dlerror());
//void *dlsym(void *handle, const char *symbol);
//int dlclose(void *handle);
return 0;
}
aroldan@volatile:~% cc -o a a.c -ldl=20=
=20=20=
aroldan@volatile:~% ./a
./xyz.so: undefined symbol: something
aroldan@volatile:~% valgrind.bin --tool=3Dmemcheck ./a
=3D=3D9779=3D=3D Memcheck, a memory error detector for x86-linux.
=3D=3D9779=3D=3D Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward e=
t al.
=3D=3D9779=3D=3D Using valgrind-2.2.0, a program supervision framework for =
x86-linux.
=3D=3D9779=3D=3D Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward e=
t al.
=3D=3D9779=3D=3D For more details, rerun with: -v
=3D=3D9779=3D=3D=20
./xyz.so: undefined symbol: something
=3D=3D9779=3D=3D=20
=3D=3D9779=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 fr=
om 1)
=3D=3D9779=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks.
=3D=3D9779=3D=3D malloc/free: 9 allocs, 9 frees, 1007 bytes allocated.
=3D=3D9779=3D=3D For a detailed leak analysis, rerun with: --leak-check=3D=
yes
=3D=3D9779=3D=3D For counts of detected errors, rerun with: -v
aroldan@volatile:~% dpkg -l valgrind libc6
Desired=
| Estado=
|/ Err?=3D(
sc.=3Dmalo)
||/ Nombre Versi=F3n Descripci=
=F3n
+++-=3D=
=3D=3D=
=3D=3D=
=3D=3D=
=3D=3D=
=3D=3D=
ii valgrind 2.2.0-4 A memory debu=
gger for x86-linux
ii libc6 2.3.2.ds1-20 GNU C Library=
: Shared libraries and Timezone data
--=20
Andr=E9s Rold=E1n
<email address hidden> / Fluidsignal Group S.A.
<email address hidden> / The Debian Project
Mobile: +57 300-7920981
GPG F/P: 0EE9 27C9 55F1 92E4 3809 B852 D8E0 724B B293 96EB
http://
In Debian Bug tracker #297798, u19809 (wim-delvaux) wrote : Re: Bug#297798: valgrind error | #25 |
On Wednesday 09 March 2005 18:14, Justin Pryzby wrote:
> Okay,
>
> Still trying to make sure I understand precisely what you're doing.
>
> It seems like you have a shared object called
>
>
> /mnt/buro/
>ation.
>
> which contains an undefined symbol.
>
> file
> /mnt/buro/
>ation.
>
> should say
>
> ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
correct, that file is just a rename of a .so file
>
> or something very similar. Right?
>
> And you are using
>
> void
> *v=dlopen(
>s/MSPApplicati
>TS.pex", RTLD_NOW);
yes. I must say that I did not try with RTLD_LAZY but with RTLD_NOW I get
the result you have.
W
Debian Bug Importer (debzilla) wrote : | #26 |
Message-Id: <email address hidden>
Date: Thu, 10 Mar 2005 01:06:01 +0100
From: wim delvaux <email address hidden>
To: Justin Pryzby <email address hidden>,
<email address hidden>
Subject: Re: Bug#297798: valgrind error
On Wednesday 09 March 2005 18:14, Justin Pryzby wrote:
> Okay,
>
> Still trying to make sure I understand precisely what you're doing.
>
> It seems like you have a shared object called
>
>
> /mnt/buro/
>ation.
>
> which contains an undefined symbol.
>
> file
> /mnt/buro/
>ation.
>
> should say
>
> ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
correct, that file is just a rename of a .so file
>
> or something very similar. Right?
>
> And you are using
>
> void
> *v=dlopen(
>s/MSPApplicati
>TS.pex", RTLD_NOW);
yes. I must say that I did not try with RTLD_LAZY but with RTLD_NOW I get
the result you have.
W
Changed in glibc: | |
assignee: | jbailey → nobody |
Malcolm Parsons (malcolm-parsons) wrote : | #27 |
Not a glibc bug.
Jonathan Anderson (jonathan-anderson) wrote : | #28 |
Given the "yes. I must say that I did not try with RTLD_LAZY but with RTLD_NOW I get the result you have", I think that we can call this confirmed.
Changed in valgrind: | |
status: | Unconfirmed → Confirmed |
rusivi2 (rusivi2-deactivatedaccount) wrote : | #29 |
Thank you for posting this bug.
Does this occur in Lucid?
Changed in valgrind (Ubuntu): | |
status: | Confirmed → Incomplete |
Changed in valgrind (Debian): | |
status: | New → Fix Released |
Alessandro Ghedini (ghedo) wrote : | #30 |
This should have been fixed around the 3.6.0 upstream release.
Changed in valgrind (Ubuntu): | |
status: | Incomplete → Fix Released |
Automatically imported from Debian bug report #297798 http:// bugs.debian. org/297798