https://bugs.kde.org/show_bug.cgi?id=345077

Mark Wielaard <m...@klomp.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
     Ever confirmed|0                           |1

--- Comment #4 from Mark Wielaard <m...@klomp.org> ---
glibc doesn't have a wrapper for execveat currently, which is most likely why
we have never seen it reported.

But glibc since 2.27 implements fexecve using execveat. So it can be seen with
something simple like:

#include <unistd.h>
#include <stddef.h>
#include <sys/stat.h>
#include <fcntl.h>

int main()
{
  char* argv[] = { "foobar", "arg1", NULL };
  char* envp[] = { NULL };

  int fd = open ("/bin/echo", O_RDONLY);
  fexecve (fd, argv, envp);
}

$ valgrind -q ./t
--210730-- WARNING: unhandled amd64-linux syscall: 322
--210730-- You may be able to write your own handler.
--210730-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--210730-- Nevertheless we consider this a bug.  Please report
--210730-- it at http://valgrind.org/support/bug_reports.html.
arg1

Note that it still works because glibc falls back to using /proc/self/[fdnr] if
the syscall fails.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to