git-svn-id: svn://svn.valgrind.org/valgrind/trunk@129
signal3.c smc1.c \
suppfree.c tronical.c \
tronical.s twoparams.c \
- twoparams.s
\ No newline at end of file
+ twoparams.s \
+ pth_cvsimple.c pth_simple_threads.c pth_simple_mutex.c \
+ bt_everything.c bt_literal.c \
+ pth_threadpool.c pth_specific.c pth_mutexspeed.c malloc3.c
--- /dev/null
+
+/* test of plausible behaviour with malloc and stupid args */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int main ( void )
+{
+ char* p;
+
+ p = malloc(0);
+ printf("malloc(0) = %p\n", p);
+ free(p);
+
+ p = malloc(-1);
+ printf("malloc(-1) = %p\n", p);
+ free(p);
+
+ p = calloc(0,1);
+ printf("calloc(0,1) = %p\n", p);
+ free(p);
+
+ p = calloc(0,-1);
+ printf("calloc(0,-1) = %p\n", p);
+ free(p);
+
+ p = calloc(-1,-1);
+ printf("calloc(-1,-1) = %p\n", p);
+ free(p);
+
+ return 0;
+}