From: Julian Seward Date: Fri, 29 Mar 2002 04:11:48 +0000 (+0000) Subject: Add a couple of bogons people sent. X-Git-Tag: svn/VALGRIND_1_0_3~409 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=437bd7c428eb28fd76141f575981143b1bcf9c16;p=thirdparty%2Fvalgrind.git Add a couple of bogons people sent. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@37 --- diff --git a/tests/stpcpy.c b/tests/stpcpy.c new file mode 100644 index 0000000000..54464be4c4 --- /dev/null +++ b/tests/stpcpy.c @@ -0,0 +1,51 @@ + +#if 0 +/* +Subject: valgrind glibc suppression + Date: Fri, 22 Mar 2002 23:54:44 -0500 (EST) + From: Alex Larsson + To: jseward@acm.org + + +Hi. + +I'm getting a lot of errors in __stpcpy(). I think this may be a bug in +glibc. I didn't analyze the stpcpy asm in detail, so it might still be a +valgrind bug, but it's probably a glibc bug. + +Here is a test case: +*/ +#endif + +#include +#include + +int main() +{ + char *string; + char buffer[10]; + + string = malloc (1); + string[0] = '\0'; + + stpcpy (buffer, string); +} + +#if 0 +/* +Gives warnings like: +==10941== Use of uninitialised CPU condition code +==10941== at 0x4034B9DA: __stpcpy (__stpcpy:36) +==10941== by 0x402DF627: __libc_start_main (../sysdeps/generic/libc-start.c:129) +==10941== by 0x80483D1: __libc_start_main@@GLIBC_2.0 (in /home/alex/other_src/valgrind-20020320/a.out) +==10941== by ??? + +Here is the supression i use: +{ + __stpcpy(Value0) + Value0 + fun:__stpcpy + fun:* +} +*/ +#endif diff --git a/tests/trivialleak.c b/tests/trivialleak.c new file mode 100644 index 0000000000..002a48a91a --- /dev/null +++ b/tests/trivialleak.c @@ -0,0 +1,12 @@ +static void test() + { + void* leak; + int i; + for (i = 0; i < 1000; i++) + leak = (void*)malloc( 100 ); + } + int main() + { + test(); + return 0; + }