]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix memcheck/tests/freebsd/fexecve
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 19 May 2022 08:10:32 +0000 (10:10 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 19 May 2022 08:10:32 +0000 (10:10 +0200)
This contained a stupid mistake, and had been working by luck.

memcheck/tests/freebsd/fexecve.c
memcheck/tests/freebsd/fexecve.stderr.exp

index 6fe62ed597d112ff9fab0ecf071320674e99c06b..222ff94ce99cdb88e88881ca95ae46a33296078f 100644 (file)
@@ -21,8 +21,8 @@ int main(int argc, char **argv, char** envp)
    int * new_fd = malloc(sizeof(int));
    *new_fd += fd;
    new_argv[1] = new_envp[1] = NULL;
-   argv[0] = arg1;
-   envp[0] = env1;
+   new_argv[0] = arg1;
+   new_envp[0] = env1;
 
    free(arg1);
    free(env1);
index 5bb85f79dc1552ab624da58b9b7882d25fe14323..a5416581680da98154abbe85b5ddc9534ea1ce2b 100644 (file)
@@ -2,22 +2,25 @@ Syscall param fexecve(fd) contains uninitialised byte(s)
    at 0x........: fexecve (in /...libc...)
    by 0x........: main (fexecve.c:29)
 
-Syscall param fexecve(argv) points to uninitialised byte(s)
-   at 0x........: fexecve (in /...libc...)
-   by 0x........: main (fexecve.c:29)
- Address 0x........ is 0 bytes inside a block of size ... alloc'd
-   at 0x........: malloc (vg_replace_malloc.c:...)
-   by 0x........: main (fexecve.c:17)
-
 Syscall param fexecve(argv[0]) points to unaddressable byte(s)
    at 0x........: fexecve (in /...libc...)
    by 0x........: main (fexecve.c:29)
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
+ Address 0x........ is 0 bytes inside a block of size 10 free'd
+   at 0x........: free (vg_replace_malloc.c:...)
+   by 0x........: main (fexecve.c:27)
+ Block was alloc'd at
+   at 0x........: malloc (vg_replace_malloc.c:...)
+   ...
+   by 0x........: main (fexecve.c:19)
 
-Syscall param fexecve(envp) points to uninitialised byte(s)
+Syscall param fexecve(envp[i]) points to unaddressable byte(s)
    at 0x........: fexecve (in /...libc...)
    by 0x........: main (fexecve.c:29)
- Address 0x........ is 0 bytes inside a block of size ... alloc'd
+ Address 0x........ is 0 bytes inside a block of size 8 free'd
+   at 0x........: free (vg_replace_malloc.c:...)
+   by 0x........: main (fexecve.c:28)
+ Block was alloc'd at
    at 0x........: malloc (vg_replace_malloc.c:...)
-   by 0x........: main (fexecve.c:18)
+   ...
+   by 0x........: main (fexecve.c:20)