Summary: | Valgrind SIGSEGV on execve | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Joshua Roys <TheReader06> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | minor | ||
Priority: | NOR | ||
Version: | 2.1 CVS | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Joshua Roys
2004-06-18 05:21:21 UTC
CVS commit by thughes: Don't try and validate the contents of the environment passed to the execve system call if the envp pointer is null as it causes valgrind to die with a segmentation fault. CCMAIL: 83573-done@bugs.kde.org A none/tests/execve.c 1.1 [no copyright] A none/tests/execve.stderr.exp 1.1 A none/tests/execve.stdout.exp 1.1 A none/tests/execve.vgtest 1.1 M +2 -1 coregrind/vg_syscalls.c 1.101 M +4 -2 none/tests/Makefile.am 1.38 --- valgrind/coregrind/vg_syscalls.c #1.100:1.101 @@ -1839,4 +1839,5 @@ PRE(execve) SYSCALL_TRACK( pre_mem_read_asciiz, tid, "execve(filename)", arg1 ); pre_argv_envp( arg2, tid, "execve(argv)", "execve(argv[i])" ); + if (arg3 != (UInt)NULL) pre_argv_envp( arg3, tid, "execve(envp)", "execve(envp[i])" ); --- valgrind/none/tests/Makefile.am #1.37:1.38 @@ -28,4 +28,5 @@ discard.vgtest \ exec-sigmask.vgtest exec-sigmask.stdout.exp exec-sigmask.stderr.exp \ + execve.vgtext execve.stdout.exp execve.stderr.exp \ floored.stderr.exp floored.stdout.exp \ floored.vgtest \ @@ -67,6 +68,6 @@ check_PROGRAMS = \ args badseg bitfield1 bt_everything bt_literal closeall coolo_strlen \ - cpuid dastest discard exec-sigmask floored fork fpu_lazy_eflags \ - fucomip $(INSN_TESTS) \ + cpuid dastest discard exec-sigmask execve floored fork \ + fpu_lazy_eflags fucomip $(INSN_TESTS) \ int munmap_exe map_unmap mremap rcl_assert \ rcrl readline1 resolv seg_override sem semlimit sha1_test \ @@ -90,4 +91,5 @@ discard_SOURCES = discard.c exec_sigmask_SOURCES = exec-sigmask.c +execve = execve.c fork_SOURCES = fork.c floored_SOURCES = floored.c |