From owner-freebsd-bugs@freebsd.org Fri Feb 16 07:27:13 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8493F1C984 for ; Fri, 16 Feb 2018 07:27:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A4F76A599 for ; Fri, 16 Feb 2018 07:27:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 7F62C1C24 for ; Fri, 16 Feb 2018 07:27:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w1G7RC5C078175 for ; Fri, 16 Feb 2018 07:27:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w1G7RCGT078174 for freebsd-bugs@FreeBSD.org; Fri, 16 Feb 2018 07:27:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 225946] /usr/bin/make Date: Fri, 16 Feb 2018 07:27:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: itsdavidmarx@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Feb 2018 07:27:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225946 Bug ID: 225946 Summary: /usr/bin/make Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: itsdavidmarx@gmail.com /usr/bin/make core dumps with this Makefile for an archive. Actually the goal is to have the Makefile work without the foo.o: foo.c entry, as it does with gmake, but for some reason I think /usr/bin/make realizes it needs to make lib.a(foo.o)=20 but doesn't make it. For: % uname -a FreeBSD metro-6.us.oracle.com 12.0-CURRENT FreeBSD 12.0-CURRENT #10 d26791952(trueos-stable-17.12): Sat Dec 9 18:10:09 UTC 2017=20=20=20=20 root@chimera:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 % cat foo.c void foo ( void) { } % cat Makefile all: lib.a lib.a: lib.a(foo.o) ranlib lib.a .c.a: cc -c foo.c ar rv lib.a foo.o rm -f foo.o foo.o: foo.c cc -c foo.c clobber: clean rm lib.a clean: rm -f foo.o % /usr/bin/make Segmentation fault % gdb /usr/bin/make run % gdb /usr/bin/make GNU gdb (GDB) 8.0.1 [GDB v8.0.1 for FreeBSD] Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/make...Reading symbols from /usr/lib/debug//usr/bin/make.debug...done. done. (gdb) run Starting program: /usr/bin/make Program received signal SIGSEGV, Segmentation fault. strlen (str=3D0x0) at /usr/src/lib/libc/string/strlen.c:102 102 /usr/src/lib/libc/string/strlen.c: No such file or directory. (gdb) where #0 strlen (str=3D0x0) at /usr/src/lib/libc/string/strlen.c:102 #1 0x000000000041aba2 in Var_Set (name=3D, val=3D, ctxt=3D0x800cf6ac0, flags=3D0) at /usr/src/contrib/bmake/var.c:973 #2 0x0000000000402090 in Compat_Make (gnp=3D0x800cf6b80, pgnp=3D0x800cf6ac= 0) at /usr/src/contrib/bmake/compat.c:657 #3 0x000000000041faf6 in Lst_ForEachFrom (l=3D0x800d700a0, ln=3D0x800d3e1c= 0, proc=3D0x401fd0 , d=3D0x800cf6ac0) at /usr/src/contrib/bmake/lst.lib/lstForEachFrom.c:104 #4 0x0000000000402041 in Compat_Make (gnp=3D0x800cf6ac0, pgnp=3D0x800cf694= 0) at /usr/src/contrib/bmake/compat.c:544 #5 0x000000000041faf6 in Lst_ForEachFrom (l=3D0x800d6fdd0, ln=3D0x800d3e16= 0, proc=3D0x401fd0 , d=3D0x800cf6940) at /usr/src/contrib/bmake/lst.lib/lstForEachFrom.c:104 #6 0x0000000000402041 in Compat_Make (gnp=3D0x800cf6940, pgnp=3D0x800cf688= 0) at /usr/src/contrib/bmake/compat.c:544 #7 0x000000000041faf6 in Lst_ForEachFrom (l=3D0x800d6fc20, ln=3D0x800d7190= 0, proc=3D0x401fd0 , d=3D0x800cf6880) at /usr/src/contrib/bmake/lst.lib/lstForEachFrom.c:104 #8 0x0000000000402041 in Compat_Make (gnp=3D0x800cf6880, pgnp=3D0x800cf67c= 0) at /usr/src/contrib/bmake/compat.c:544 #9 0x000000000041faf6 in Lst_ForEachFrom (l=3D0x800d6fb00, ln=3D0x800d718a= 0, proc=3D0x401fd0 , d=3D0x800cf67c0) at /usr/src/contrib/bmake/lst.lib/lstForEachFrom.c:104 ---Type to continue, or q to quit--- #10 0x0000000000402041 in Compat_Make (gnp=3D0x800cf67c0, pgnp=3D0x800cf67c= 0) at /usr/src/contrib/bmake/compat.c:544 #11 0x00000000004024e6 in Compat_Run (targs=3D0x800cfa3a0) at /usr/src/contrib/bmake/compat.c:761 #12 0x000000000040cce7 in runTargets () at /usr/src/contrib/bmake/main.c:960 #13 main (argc=3D1, argv=3D) at /usr/src/contrib/bmake/main.= c:1498 (gdb) x/i $rip =3D> 0x460b7f : mov (%rcx),%rax (gdb) x/x $rcx 0x0: Cannot access memory at address 0x0 (gdb) Appears to be strlen of a null pointer. Whatever garbage I give make, it should not core dump. And this does work with gmake. Thanks. --=20 You are receiving this mail because: You are the assignee for the bug.=