Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2006 01:19:11 +0300 (EEST)
From:      Tsampros Leonidas <ltsampros@upnet.gr>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/99985: make crashes with invalid continuation lines
Message-ID:  <200607092219.k69MJBgJ007123@biftekaki.lan>
Resent-Message-ID: <200607092230.k69MUFEg002755@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         99985
>Category:       bin
>Synopsis:       make crashes with invalid continuation lines
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 09 22:30:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Tsampros Leonidas
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
FreeBSD
System: FreeBSD biftekaki.lan 6.1-STABLE FreeBSD 6.1-STABLE #0: Sun Jul 2 17:23:11 UTC 2006 root@biftekaki.lan:/usr/obj/usr/src/sys/GENERIC i386

>Description:
	Make crashes with invalid continuation lines

>How-To-Repeat:
$ cat foo.c
int main(int argc, char *argv[]) {
        return 0;
}

$ cat koko.c
int number(int c);

int number(int c) {
        return c;
}

$ cat -nvte Makefile
     1  PROG=^Ifoo$
     2  $
     3  SRCS=^Ifoo.c \$
     4  ^Ikoko.c \ $
     5  $
     6  NO_MAN=^IYES$
     7  $
     8  .include <bsd.prog.mk>$

[gaghiel@biftekaki]make-bug $ make
Segmentation fault: 11 (core dumped)

$ gdb /usr/bin/make make.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `make'.
Program terminated with signal 11, Segmentation fault.
#0  0x08058c98 in brk_string (aa=0xbfbfd3d0, str=0x80caff0 "\\", expand=0) at /usr/src/usr.bin/make/str.c:262
262                                     *arg++ = str[0];
(gdb) bt
#0  0x08058c98 in brk_string (aa=0xbfbfd3d0, str=0x80caff0 "\\", expand=0) at /usr/src/usr.bin/make/str.c:262
#1  0x0805deab in VarModify (str=0x80c90d0 "\\", modProc=0x805caa8 <VarRoot>, datum=0x0) at /usr/src/usr.bin/make/var.c:1186
#2  0x0805ec72 in ParseModifier (vp=0xbfbfd570, startc=123 '{', v=0x80c9080, freeResult=0xbfbfd548) at /usr/src/usr.bin/make/var.c:1793
#3  0x0805ede9 in ParseRestModifier (vp=0xbfbfd570, startc=123 '{', buf=0x80c90c0, freeResult=0xbfbfd548) at /usr/src/usr.bin/make/var.c:1831
#4  0x0805f544 in VarParseLong (vp=0xbfbfd570, freeResult=0xbfbfd548) at /usr/src/usr.bin/make/var.c:2050
#5  0x0805f84f in VarParse (vp=0xbfbfd570, freeResult=0xbfbfd548) at /usr/src/usr.bin/make/var.c:2156
#6  0x0805fc8a in Var_SubstOnly (var=0x80c8a00 "_S", str=0x80c8b00 "${_S:R}.o: ${_S}\n", err=0) at /usr/src/usr.bin/make/var.c:2426
#7  0x0804d49c in For_Run (lineno=76) at /usr/src/usr.bin/make/for.c:274
#8  0x08057434 in parse_for (line=0x80c8f00 "\\", code=0, lineno=76) at /usr/src/usr.bin/make/parse.c:2279
#9  0x080575a4 in parse_directive (line=0x80c8901 "for _S in ${SRCS:N*.[hly]}") at /usr/src/usr.bin/make/parse.c:2335
#10 0x08057614 in Parse_File (name=0x80a8340 "Makefile", stream=0x8095120) at /usr/src/usr.bin/make/parse.c:2367
#11 0x08052c3b in ReadMakefile (p=0x8087e27 "Makefile") at /usr/src/usr.bin/make/main.c:312
#12 0x08053e2b in main (argc=1, argv=0xbfbfe83c) at /usr/src/usr.bin/make/main.c:971

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607092219.k69MJBgJ007123>