Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 1999 03:18:04 -0500 (EST)
From:      "John W. DeBoskey" <jwd@unx.sas.com>
To:        freebsd-current@FreeBSD.ORG
Cc:        jkh@zippy.cdrom.com, freebsd-bugs@FreeBSD.ORG
Subject:   Bug in make affecting release crunchs
Message-ID:  <199901080818.DAA33723@bb01f39.unx.sas.com>

next in thread | raw e-mail | index | archive | help
Hi Folks, Jordan,

    I found the problem with the boot_crunch in make release..

    Basically, Parse_IsVar() in parse.c contains the following
code snippet:

        default:
#ifdef SUNSHCMD
            while (*opc != ':')
                if (--opc < line)
                    break;


   Well, this allows opc to end up pointing to the character
just prior to line... ie:  opc == 0807e2ff  line == 0807e300

   Then this code:

            if (strncmp(opc, ":sh", 3) == 0) {
                type = VAR_SHELL;
                *opc = '\0';
                break;  
            }
#endif


   ends up comparing true if that 1 character in front of the
variable line happens to be a ':' and we are trying to set the
variable named 'sh_SRCDIR'.  (What a bummer...)


   The simple fix (diff -u):

diff -u parse.c.orig parse.c
--- parse.c.orig        Sun May 31 02:23:33 1998
+++ parse.c     Fri Jan  8 03:05:23 1999
@@ -1412,8 +1412,10 @@
        default:
 #ifdef SUNSHCMD
            while (*opc != ':')
-               if (--opc < line)
+               if (--opc < line) {
+                   ++opc;
                    break;
+               }
 
            if (strncmp(opc, ":sh", 3) == 0) {
                type = VAR_SHELL;



   Would some nice committer please commit this?

Thanks!
John


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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