8 Commits

Author SHA1 Message Date
Mark Wielaard
8eb547054a Warn for execve syscall with argv or argv[0] being NULL.
For execve valgrind would silently fail when argv was NULL or
unadressable. Make sure that this produces a warning under memcheck.

The linux kernel accepts argv[0] being NULL, but most other kernels
don't since posix says it should be non-NULL and it causes argc to
be zero which is unexpected and might cause security issues.

This adjusts some testcases so they don't rely on execve succeeding
when argv is NULL and expect warnings about argv or argv[0] being
NULL or unaddressable.

https://bugs.kde.org/show_bug.cgi?id=450437
2022-04-06 22:48:45 +02:00
Paul Floyd
53dd9bd255 FreeBSD support, patch 9
cachegrind callgrind dhat exp-bbv gdbserver_tests massif none mpi shared

Mostly these are just updates (and new testcases) under new/tests
The other directories have just #ifdef changes
2021-10-07 22:41:22 +02:00
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00
Florian Krohm
dc3f09be77 Fix BZ 339789. /bin/true does not exist on Darwin.
Patch by rhyskidd@gmail.com.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14645
2014-10-20 21:29:26 +00:00
Philippe Waroquiers
12633f0117 Modify none/tests/execve.c so to avoid infinite loop with --trace-children=yes
With --trace-children=yes, none/test/execve exec ve forever.

This avoids an infinite loop when running outer on inner regression
tests (for which --trace-children=yes is mandatory for the outer).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12440
2012-03-11 20:47:41 +00:00
Nicholas Nethercote
2047484bc5 Add a comment explaining this test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8984
2009-01-19 21:33:25 +00:00
Tom Hughes
3a75fc74df Fix checking of execve() when argv is a null pointer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2520
2004-07-21 16:23:38 +00:00
Tom Hughes
827e3bebb6 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


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2427
2004-06-19 13:02:34 +00:00