usual reasons. Also update an expected output (lines numbers in
h_intercepts.c should be removed by the regtest system, really).
--> 3_4_BRANCH
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9060
+#define STRNLEN(soname, fnname) \
+ SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* str, SizeT n ); \
+ SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* str, SizeT n ) \
+ { \
+ SizeT i = 0; \
+ while (i < n && str[i] != 0) i++; \
+ return i; \
+ }
+
+STRNLEN(m_libc_soname, strnlen)
+
+
// Note that this replacement often doesn't get used because gcc inlines
// calls to strlen() with its own built-in version. This can be very
// confusing if you aren't expecting it. Other small functions in this file
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:85)
+ at 0x........: strlen (h_intercepts.c:97)
by 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:88)
Actual: unknown
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:85)
+ at 0x........: strlen (h_intercepts.c:97)
by 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:93)
Actual: unknown
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:85)
+ at 0x........: strlen (h_intercepts.c:97)
by 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:98)