bugmake - Bugs: bug #30748, Segmentation violation for SHELL...

 
 

bug #30748: Segmentation violation for SHELL with "strange" character

Submitter:  Petr Machata <pmachata>
Submitted:  Wed 11 Aug 2010 02:49:30 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  3.82 Operating System:  None
Fixed Release:  4.0 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 29 Aug 2010 04:51:25 AM UTC, comment #2: 

Thanks for the patch.  I used a slightly different fix but your example now works.  Cheers!

Paul D. Smith <psmith>
Group administrator
Thu 12 Aug 2010 12:31:46 PM UTC, comment #1: 

It seems appending the shell flag "-c" was dropped between the releases:

$ strace -f make -f ../y.mk # or really snip thereof
[pid 16358] execve("/bin/sh", ["/bin/sh", "-c", "python^ -c print\\ 7"], [/* 48 vars */]) = 0
$ strace -f ./make -f ../y.mk # again, a snip thereof
[pid 16372] execve("/bin/sh", ["/bin/sh", "python^ -c print\\ 7"], [/* 48 vars */]) = 0

I'm attaching a patch that fixes this by setting shellflags to default value "-c" if not set.  That renders my earlier patch unnecessary.

(file #21203)

Petr Machata <pmachata>
Wed 11 Aug 2010 02:49:30 PM UTC, original submission:  

$ cat ../y.mk
SHELL:=python^
all:; @print 6
$ ./make -f ../y.mk
Segmentation fault

When this gets fixed (I'll attach the patch, but I'm not sure whether I'm not just patching over some deeper bug):
$ ./make -f ../y.mk
/bin/sh: python^ -c print\ 6: No such file or directory
make: * [all] Error 127

Even though:
$ python^ -c print\ 6
6

Petr Machata <pmachata>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

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 pmachata (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-29 psmith Item GroupNone Bug
        StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Component Version4.0 3.82
        Fixed ReleaseNone 4.0
    2010-08-12 pmachata Attached File- Added make-3.82-weird-shell.patch, #21203
    2010-08-11 pmachata Attached File- Added make-3.82-weird-shell-segv.patch, #21193

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code