This commit is contained in:
parent
fdf83ee3d6
commit
6b2888c907
70
putenv-wrapper.diff
Normal file
70
putenv-wrapper.diff
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
--- memcheck/mc_replace_strmem.c
|
||||||
|
+++ memcheck/mc_replace_strmem.c
|
||||||
|
@@ -636,6 +636,67 @@ GLIBC25___STPCPY_CHK(m_libc_so_star, __s
|
||||||
|
GLIBC25_MEMPCPY(m_libc_so_star, mempcpy)
|
||||||
|
GLIBC25_MEMPCPY(m_ld_so_1, mempcpy) /* ld.so.1 */
|
||||||
|
|
||||||
|
+/*------------------------------------------------------------*/
|
||||||
|
+/*--- Improve definedness checking of process environment ---*/
|
||||||
|
+/*------------------------------------------------------------*/
|
||||||
|
+
|
||||||
|
+/* putenv */
|
||||||
|
+int VG_WRAP_FUNCTION_ZU(m_libc_so_star, putenv) (char* string);
|
||||||
|
+int VG_WRAP_FUNCTION_ZU(m_libc_so_star, putenv) (char* string)
|
||||||
|
+{
|
||||||
|
+ OrigFn fn;
|
||||||
|
+ int result;
|
||||||
|
+ const char* p = string;
|
||||||
|
+ VALGRIND_GET_ORIG_FN(fn);
|
||||||
|
+ /* Now by walking over the string we magically produce
|
||||||
|
+ traces when hitting undefined memory. */
|
||||||
|
+ if (p)
|
||||||
|
+ while (*p++)
|
||||||
|
+ ;
|
||||||
|
+ CALL_FN_W_W(result, fn, string);
|
||||||
|
+ return result;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* unsetenv */
|
||||||
|
+int VG_WRAP_FUNCTION_ZU(m_libc_so_star, unsetenv) (const char* name);
|
||||||
|
+int VG_WRAP_FUNCTION_ZU(m_libc_so_star, unsetenv) (const char* name)
|
||||||
|
+{
|
||||||
|
+ OrigFn fn;
|
||||||
|
+ int result;
|
||||||
|
+ const char* p = name;
|
||||||
|
+ VALGRIND_GET_ORIG_FN(fn);
|
||||||
|
+ /* Now by walking over the string we magically produce
|
||||||
|
+ traces when hitting undefined memory. */
|
||||||
|
+ if (p)
|
||||||
|
+ while (*p++)
|
||||||
|
+ ;
|
||||||
|
+ CALL_FN_W_W(result, fn, name);
|
||||||
|
+ return result;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* setenv */
|
||||||
|
+int VG_WRAP_FUNCTION_ZU(m_libc_so_star, setenv)
|
||||||
|
+ (const char* name, const char* value, int overwrite);
|
||||||
|
+int VG_WRAP_FUNCTION_ZU(m_libc_so_star, setenv)
|
||||||
|
+ (const char* name, const char* value, int overwrite)
|
||||||
|
+{
|
||||||
|
+ OrigFn fn;
|
||||||
|
+ int result;
|
||||||
|
+ const char* p;
|
||||||
|
+ VALGRIND_GET_ORIG_FN(fn);
|
||||||
|
+ /* Now by walking over the string we magically produce
|
||||||
|
+ traces when hitting undefined memory. */
|
||||||
|
+ if (name)
|
||||||
|
+ for (p = name; *p; p++)
|
||||||
|
+ ;
|
||||||
|
+ if (value)
|
||||||
|
+ for (p = value; *p; p++)
|
||||||
|
+ ;
|
||||||
|
+ VALGRIND_CHECK_VALUE_IS_DEFINED (overwrite);
|
||||||
|
+ CALL_FN_W_WWW(result, fn, name, value, overwrite);
|
||||||
|
+ return result;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------*/
|
||||||
|
/*--- end ---*/
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 30 11:41:19 CEST 2007 - dmueller@suse.de
|
||||||
|
|
||||||
|
- add patch to track undefinedness in environment (#249676)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 30 14:22:31 CET 2007 - dmueller@suse.de
|
Tue Jan 30 14:22:31 CET 2007 - dmueller@suse.de
|
||||||
|
|
||||||
|
@ -26,13 +26,14 @@ Group: Development/Tools/Debuggers
|
|||||||
Summary: Memory Management Debugger
|
Summary: Memory Management Debugger
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Version: 3.2.3
|
Version: 3.2.3
|
||||||
Release: 1
|
Release: 8
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_2_1 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH > 3_2_BRANCH.diff
|
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_2_1 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH > 3_2_BRANCH.diff
|
||||||
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_2_1 svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH > VEX_3_2_BRANCH.diff
|
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_2_1 svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH > VEX_3_2_BRANCH.diff
|
||||||
Patch3: valgrind-6012.patch
|
Patch3: valgrind-6012.patch
|
||||||
Patch4: openat-handling.diff
|
Patch4: openat-handling.diff
|
||||||
Patch5: omega_RC_01.patch
|
Patch5: omega_RC_01.patch
|
||||||
|
Patch6: putenv-wrapper.diff
|
||||||
Provides: callgrind
|
Provides: callgrind
|
||||||
Obsoletes: callgrind
|
Obsoletes: callgrind
|
||||||
ExclusiveArch: %ix86 x86_64 ppc ppc64
|
ExclusiveArch: %ix86 x86_64 ppc ppc64
|
||||||
@ -78,6 +79,7 @@ cd ..
|
|||||||
%patch5
|
%patch5
|
||||||
%endif
|
%endif
|
||||||
%patch4
|
%patch4
|
||||||
|
%patch6
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
@ -101,7 +103,9 @@ mv $RPM_BUILD_ROOT/usr/share/doc/valgrind $RPM_BUILD_ROOT/usr/share/doc/packages
|
|||||||
%_libdir/valgrind
|
%_libdir/valgrind
|
||||||
%doc %_mandir/*/*
|
%doc %_mandir/*/*
|
||||||
|
|
||||||
%changelog -n valgrind
|
%changelog
|
||||||
|
* Fri Mar 30 2007 - dmueller@suse.de
|
||||||
|
- add patch to track undefinedness in environment (#249676)
|
||||||
* Tue Jan 30 2007 - dmueller@suse.de
|
* Tue Jan 30 2007 - dmueller@suse.de
|
||||||
- update to 3.2.3:
|
- update to 3.2.3:
|
||||||
* fixes two serious regressions introduced in 3.2.2
|
* fixes two serious regressions introduced in 3.2.2
|
||||||
|
Loading…
Reference in New Issue
Block a user