NetBSD-Bugs archive

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

Re: bin/52737 (bmake crash for invalid usage of .PATH)



The following reply was made to PR bin/52737; it has been noted by GNATS.

From: "Simon J. Gerraty" <sjg%juniper.net@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: <gnats-bugs%netbsd.org@localhost>, <gnats-admin%netbsd.org@localhost>,
        <netbsd-bugs%netbsd.org@localhost>, <n54%gmx.com@localhost>,
        "bsiegert%netbsd.org@localhost"
	<bsiegert%netbsd.org@localhost>, <sjg%juniper.net@localhost>
Subject: Re: bin/52737 (bmake crash for invalid usage of .PATH)
Date: Tue, 9 Apr 2019 10:44:25 -0700

 Christos Zoulas <christos%zoulas.com@localhost> wrote:
 
 > I'd rather unconditionally free "paths" if it was not NULL rather than a=
 dd more complexity
 > to the code. This function needs to be split up; it is too big and compl=
 icated.
 
 That works for me, so diff is then just:
 
 diff -r 6f103b9234c3 bmake/parse.c
 --- a/bmake/parse.c	Sun Dec 30 09:28:02 2018 -0800
 +++ b/bmake/parse.c	Tue Apr 09 10:42:04 2019 -0700
 @@ -1768,7 +1768,8 @@
      }
  =
 
  out:
 -    assert(paths =3D=3D NULL);
 +    if (paths)
 +	Lst_Destroy(paths, NULL);
      if (curTargs)
  	    Lst_Destroy(curTargs, NULL);
  }
 


Home | Main Index | Thread Index | Old Index