bugmake - Bugs: bug #62145, Unlink the stdin temporary file on...

 
 

bug #62145: Unlink the stdin temporary file on failure to re-execute.

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Sun 06 Mar 2022 07:36:16 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.4 Operating System:  POSIX-Based
Fixed Release:  4.4 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 24 Apr 2022 06:16:09 PM UTC, comment #1: 

Fixed.  Thanks!

Paul D. Smith <psmith>
Group administrator
Sun 06 Mar 2022 07:36:16 PM UTC, original submission:  

Make creates a temporary file to store the make code read from stdin.
If make needs to re-execute itself and this attempt to re-execute fails, make neglects to unlink the temporary file.


$ cat makefile
def:; $(info hello world)
$(MAKE_RESTARTS)makefile: force; touch $@ && chmod -x $(MAKE)
force::
$ echo 'all: $(info hello)' | ./make -Rd -f makefile -f-
GNU Make 4.3.90
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'makefile'...
Reading makefile '/tmp/GmjNbYoy'...
hello
Updating makefiles....
 Considering target file 'makefile'.
   Considering target file 'force'.
    File 'force' does not exist.
    Looking for an implicit rule for 'force'.
    No implicit rule found for 'force'.
    Finished prerequisites of target file 'force'.
   Target 'force' is double-colon and has no prerequisites.
   Must remake target 'force'.
   Successfully remade target file 'force'.
  Finished prerequisites of target file 'makefile'.
  Prerequisite 'force' of target 'makefile' does not exist.
 Must remake target 'makefile'.
makefile:2: update target 'makefile' due to: force
touch makefile && chmod -x /tmp/test/./make
Putting child 0x55abdef52870 (makefile) PID 3695 on the chain.
Live child 0x55abdef52870 (makefile) PID 3695
Reaping winning child 0x55abdef52870 PID 3695
Removing child 0x55abdef52870 PID 3695 from chain.
 Successfully remade target file 'makefile'.
 Considering target file '/tmp/GmjNbYoy'.
 File '/tmp/GmjNbYoy' was considered already.
Re-executing[1]: /tmp/test/./make -Rd -f makefile --temp-stdin=/tmp/GmjNbYoy
make: /tmp/test/./make: Permission denied
$ ls /tmp/GmjNbYoy
/tmp/GmjNbYoy


Dmitry Goncharov <dgoncharov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52964:  sv62145_test.diff added by dgoncharov (4KiB - text/x-patch)
file #52965:  sv62145_fix.diff added by dgoncharov (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dgoncharov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-24 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
    2022-03-06 dgoncharov Attached File- Added sv62145_test.diff, #52964
        Attached File- Added sv62145_fix.diff, #52965

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code