Bug 333434 - In some weird corner case Valgrind cannot execute executable files symlinked by /proc/self/fd
Summary: In some weird corner case Valgrind cannot execute executable files symlinked ...
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.9.0
Platform: unspecified Linux
: NOR minor
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-14 23:53 UTC by Steven Stewart-Gallus
Modified: 2023-10-12 15:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Stewart-Gallus 2014-04-14 23:53:21 UTC
I open an executable file and then execute it using /proc/self/fd and posix_spawn.
Strangely, the child process exits with exit code 126 (a special exit status for when execve does not work correctly).
This bug resembles the feature that is supposedly not easily able to be implemented in https://bugs.kde.org/show_bug.cgi?id=331311 where extra Valgrind specific files are shown in /proc/self/fd but seems more serious because executing specific files in /proc/self/fd is used in GLibc's implementation of fexecve and this bug might also affect that functionality as well.
Oddly, the bug perfectly reproduces every time on my project at https://gitorious.org/linted/linted/commits/627342ab60501a8c205aebd36684bad8b564fc0e but cannot seem to be reproduced for a reduced test case.

Reproducible: Always