|
From: <sv...@va...> - 2013-10-29 20:49:28
|
Author: bart
Date: Tue Oct 29 20:49:16 2013
New Revision: 13706
Log:
drd: Add three additional strncpy() and strncmp() intercepts (#326816)
Modified:
trunk/drd/drd_strmem_intercepts.c
Modified: trunk/drd/drd_strmem_intercepts.c
==============================================================================
--- trunk/drd/drd_strmem_intercepts.c (original)
+++ trunk/drd/drd_strmem_intercepts.c Tue Oct 29 20:49:16 2013
@@ -194,6 +194,7 @@
#if defined(VGO_linux)
STRNCPY(VG_Z_LIBC_SONAME, strncpy)
STRNCPY(VG_Z_LIBC_SONAME, __GI_strncpy)
+ STRNCPY(VG_Z_LIBC_SONAME, __strncpy_sse2)
STRNCPY(VG_Z_LIBC_SONAME, __strncpy_sse2_unaligned)
#elif defined(VGO_darwin)
//STRNCPY(VG_Z_LIBC_SONAME, strncpy)
@@ -227,6 +228,8 @@
#if defined(VGO_linux)
STRNCMP(VG_Z_LIBC_SONAME, strncmp)
STRNCMP(VG_Z_LIBC_SONAME, __GI_strncmp)
+ STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse2)
+ STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse42)
#elif defined(VGO_darwin)
//STRNCMP(VG_Z_LIBC_SONAME, strncmp)
//STRNCMP(VG_Z_DYLD, strncmp)
|
|
From: Дмитрий Д. <di...@gm...> - 2013-10-30 13:31:47
|
Hi! Only curiosity: why its not possible to use memcheck/mc_replace_strmem.c ? I try the following patch and 'make regtest' show no new FAIL. Fedora 19/x64/gcc-4.8.2 V-trunk If my observation is correct then, probably, V may have only one file with interceptions? Dmitry valgrind]$ svn diff Index: drd/Makefile.am =================================================================== --- drd/Makefile.am (revision 13706) +++ drd/Makefile.am (working copy) @@ -124,7 +124,8 @@ VGPRELOAD_DRD_SOURCES_COMMON = \ drd_pthread_intercepts.c \ drd_qtcore_intercepts.c \ - drd_strmem_intercepts.c + ../memcheck/mc_replace_strmem.c + # drd_strmem_intercepts.c if VGCONF_OS_IS_DARWIN VGPRELOAD_DRD_SOURCES_COMMON += drd_darwin_intercepts.c 2013/10/30 <sv...@va...>: > Author: bart > Date: Tue Oct 29 20:49:16 2013 > New Revision: 13706 > > Log: > drd: Add three additional strncpy() and strncmp() intercepts (#326816) > > Modified: > trunk/drd/drd_strmem_intercepts.c > > Modified: trunk/drd/drd_strmem_intercepts.c > ============================================================================== > --- trunk/drd/drd_strmem_intercepts.c (original) > +++ trunk/drd/drd_strmem_intercepts.c Tue Oct 29 20:49:16 2013 > @@ -194,6 +194,7 @@ > #if defined(VGO_linux) > STRNCPY(VG_Z_LIBC_SONAME, strncpy) > STRNCPY(VG_Z_LIBC_SONAME, __GI_strncpy) > + STRNCPY(VG_Z_LIBC_SONAME, __strncpy_sse2) > STRNCPY(VG_Z_LIBC_SONAME, __strncpy_sse2_unaligned) > #elif defined(VGO_darwin) > //STRNCPY(VG_Z_LIBC_SONAME, strncpy) > @@ -227,6 +228,8 @@ > #if defined(VGO_linux) > STRNCMP(VG_Z_LIBC_SONAME, strncmp) > STRNCMP(VG_Z_LIBC_SONAME, __GI_strncmp) > + STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse2) > + STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse42) > #elif defined(VGO_darwin) > //STRNCMP(VG_Z_LIBC_SONAME, strncmp) > //STRNCMP(VG_Z_DYLD, strncmp) > > > ------------------------------------------------------------------------------ > Android is increasing in popularity, but the open development platform that > developers love is also attractive to malware creators. Download this white > paper to learn more about secure code signing practices that can help keep > Android apps secure. > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: Bart V. A. <bva...@ac...> - 2013-10-30 14:03:41
|
On 30/10/2013 6:30, Дмитрий Дьяченко wrote: > Hi! > Only curiosity: why its not possible to use memcheck/mc_replace_strmem.c ? > I try the following patch and 'make regtest' show no new FAIL. Fedora > 19/x64/gcc-4.8.2 V-trunk > > If my observation is correct then, probably, V may have only one file > with interceptions? > > Dmitry > > > valgrind]$ svn diff > Index: drd/Makefile.am > =================================================================== > --- drd/Makefile.am (revision 13706) > +++ drd/Makefile.am (working copy) > @@ -124,7 +124,8 @@ > VGPRELOAD_DRD_SOURCES_COMMON = \ > drd_pthread_intercepts.c \ > drd_qtcore_intercepts.c \ > - drd_strmem_intercepts.c > + ../memcheck/mc_replace_strmem.c > + # drd_strmem_intercepts.c > > if VGCONF_OS_IS_DARWIN > VGPRELOAD_DRD_SOURCES_COMMON += drd_darwin_intercepts.c Hello Dmitry, Merging the strmem intercepts in memcheck/mc_replace_strmem.c, drd/drd_strmem_intercepts.c and helgrind/hg_intercepts.c is something that is on my to-do list. My plan is to have a closer look at this once I'm back home (I'm traveling now). The above patch is wrong though because it removes the *_sse* intercepts from drd and hence would reintroduce bugs like https://bugs.kde.org/show_bug.cgi?id=326623. Bart. |
|
From: Дмитрий Д. <di...@gm...> - 2013-10-30 14:37:41
|
Hello Bart! Thank you for clarification! Dmitry 30.10.2013 18:03 пользователь "Bart Van Assche" <bva...@ac...> написал: > On 30/10/2013 6:30, Дмитрий Дьяченко wrote: > >> Hi! >> Only curiosity: why its not possible to use memcheck/mc_replace_strmem.c ? >> I try the following patch and 'make regtest' show no new FAIL. Fedora >> 19/x64/gcc-4.8.2 V-trunk >> >> If my observation is correct then, probably, V may have only one file >> with interceptions? >> >> Dmitry >> >> >> valgrind]$ svn diff >> Index: drd/Makefile.am >> ==============================**==============================**======= >> --- drd/Makefile.am (revision 13706) >> +++ drd/Makefile.am (working copy) >> @@ -124,7 +124,8 @@ >> VGPRELOAD_DRD_SOURCES_COMMON = \ >> drd_pthread_intercepts.c \ >> drd_qtcore_intercepts.c \ >> - drd_strmem_intercepts.c >> + ../memcheck/mc_replace_strmem.**c >> + # drd_strmem_intercepts.c >> >> if VGCONF_OS_IS_DARWIN >> VGPRELOAD_DRD_SOURCES_COMMON += drd_darwin_intercepts.c >> > > Hello Dmitry, > > Merging the strmem intercepts in memcheck/mc_replace_strmem.c, > drd/drd_strmem_intercepts.c and helgrind/hg_intercepts.c is something that > is on my to-do list. My plan is to have a closer look at this once I'm back > home (I'm traveling now). The above patch is wrong though because it > removes the *_sse* intercepts from drd and hence would reintroduce bugs > like https://bugs.kde.org/show_bug.**cgi?id=326623<https://bugs.kde.org/show_bug.cgi?id=326623> > . > > Bart. > > |