diff options
Diffstat (limited to 'valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/resources/basicTest/test.c')
-rw-r--r-- | valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/resources/basicTest/test.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/resources/basicTest/test.c b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/resources/basicTest/test.c new file mode 100644 index 0000000000..b70783fd0a --- /dev/null +++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/resources/basicTest/test.c @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Elliott Baron <ebaron@redhat.com> - initial API and implementation + *******************************************************************************/ +#include <stdlib.h> + +#define SIZE 10 +int main() { + char *waste = (char *)malloc(sizeof(char) * SIZE); + waste[0] = waste[SIZE]; + waste[SIZE] = 0; + return 0; +} |