[bug #58174] make runs execve for a directory

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #58174] make runs execve for a directory

anonymous
URL:
  <https://savannah.gnu.org/bugs/?58174>

                 Summary: make runs execve for a directory
                 Project: make
            Submitted by: marxin
            Submitted on: Tue 14 Apr 2020 12:35:11 PM UTC
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: None
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

$ cd /tmp/
$ mkdir gcc
$ cat Makefile
foo: foo.c
        gcc foo.c -o foo

$ export PATH=/tmp/:$PATH
$ echo "int main() {}" > foo.c && make foo
gcc foo.c -o foo
make: gcc: Permission denied
make: *** [Makefile:2: foo] Error 127

where make wrongly does:
[pid 22621] execve("/tmp/gcc", ["gcc", "foo.c", "-o", "foo"], 0x5555555c1d60
/* 76 vars */) = -1 EACCES (Permission denied)

$ which gcc
/usr/bin/gcc




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58174>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply | Threaded
Open this post in threaded view
|

[bug #58174] make runs execve for a directory

anonymous
Update of bug #58174 (project make):

                  Status:                    None => Duplicate              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #1:

This is a duplicate of bug #57962 which is a bug in gnulib (that make uses for
path lookup).

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58174>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/