bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segfault on $(file > bug)


From: Paul Smith
Subject: Re: Segfault on $(file > bug)
Date: Sat, 30 May 2015 13:53:50 -0400

On Mon, 2015-05-25 at 19:02 +0200, Andreas Freimuth wrote:
> make segfaults after a
>  $(file > bug)
> statement.
> 
> How to reproduce:
> $ mkdir /tmp/makeBUG && cd /tmp/makeBUG
> $ echo '$(file > bug)' > makefile
> $ make
> 
> Tested with:
> 
> GNU Make 4.0
> Built for x86_64-redhat-linux-gnu

In GNU make 4.0, that statement was invalid.  You always had to provide
a second argument containing something to write to the file (it could be
empty).  If you use:

  $ echo '$(file > bug,)' > makefile

(note added comma after bug) then you'd get expected behavior with no
core dump.  Of course, the core dump was obviously a bug.

> GNU Make 4.1
> Built for x86_64-unknown-linux-gnu

In GNU make 4.1, it is now legal to simply omit the argument altogether.
I don't see any core dump in this version; please verify that you're
really running GNU make 4.1 when you see this problem.  See the NEWS
file for 4.1:

> * Allow a no-text-argument form of the $(file ...) function.  Without a
>   text argument nothing is written to the file: it is simply opened in the
>   requested mode, then closed again.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]