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

 
 

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

Submitted by:  Petr Machata <pmachata>
Submitted on:  Wed 11 Aug 2010 02:49:30 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.82Operating System: None
Fixed Release: 4.0Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 29 Aug 2010 04:51:25 AM UTCpsmithItem GroupNone=>Bug
      StatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Component Version4.0=>3.82
      Fixed ReleaseNone=>4.0
    Thu 12 Aug 2010 12:31:46 PM UTCpmachataAttached File-=>Added make-3.82-weird-shell.patch, #21203
    Wed 11 Aug 2010 02:49:30 PM UTCpmachataAttached File-=>Added make-3.82-weird-shell-segv.patch, #21193

    Back to the top


    Powered by Savane 3.1-cleanup1