mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
Regression test for fix for #129866.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6005
This commit is contained in:
parent
054de9b1f3
commit
e46821045c
@ -28,6 +28,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
|
||||
async-sigs.stderr.exp async-sigs.stdout.exp async-sigs.vgtest \
|
||||
bitfield1.stderr.exp bitfield1.vgtest \
|
||||
blockfault.vgtest blockfault.stderr.exp blockfault.stdout.exp \
|
||||
bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
|
||||
closeall.stderr.exp closeall.vgtest \
|
||||
cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \
|
||||
cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \
|
||||
@ -131,7 +132,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
|
||||
|
||||
check_PROGRAMS = \
|
||||
ansi args \
|
||||
async-sigs bitfield1 blockfault closeall coolo_strlen \
|
||||
async-sigs bitfield1 blockfault \
|
||||
bug129866 \
|
||||
closeall coolo_strlen \
|
||||
discard exec-sigmask execve faultstatus fcntl_setown \
|
||||
fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \
|
||||
fdleak_fcntl fdleak_ipv4 fdleak_open fdleak_pipe \
|
||||
|
||||
34
none/tests/bug129866.c
Normal file
34
none/tests/bug129866.c
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
char * touch_malloc (int size)
|
||||
{
|
||||
char * result;
|
||||
int i;
|
||||
result = malloc (size);
|
||||
for (i = 0; i < size; i++)
|
||||
*(result + i) = 'a';
|
||||
|
||||
return result;
|
||||
}
|
||||
char * touch_realloc (char * ptr, int size)
|
||||
{
|
||||
char * result;
|
||||
int i;
|
||||
result = realloc (ptr, size);
|
||||
for (i = 0; i < size; i++)
|
||||
*(result + i) = 'a';
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int main ( void )
|
||||
{
|
||||
char *a1, *b1, *a2, *b2;
|
||||
printf("started\n");
|
||||
a1 = touch_malloc(1600000) ;
|
||||
b1 = touch_malloc(200000) ;
|
||||
a2 = touch_realloc(a1, 1601600) ;
|
||||
b2 = touch_realloc(b1, 200000) ;
|
||||
printf("success\n");
|
||||
return 0;
|
||||
};
|
||||
2
none/tests/bug129866.stderr.exp
Normal file
2
none/tests/bug129866.stderr.exp
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
2
none/tests/bug129866.stdout.exp
Normal file
2
none/tests/bug129866.stdout.exp
Normal file
@ -0,0 +1,2 @@
|
||||
started
|
||||
success
|
||||
1
none/tests/bug129866.vgtest
Normal file
1
none/tests/bug129866.vgtest
Normal file
@ -0,0 +1 @@
|
||||
prog: bug129866
|
||||
Loading…
x
Reference in New Issue
Block a user