Source-Changes archive

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

CVS commit: src/usr.bin/make



Module Name:    src
Committed By:   rillig
Date:           Tue Sep  8 05:26:22 UTC 2020

Modified Files:
        src/usr.bin/make: parse.c suff.c var.c
        src/usr.bin/make/unit-tests: dep-var.exp dep-var.mk

Log Message:
make(1): fix off-by-one error in SuffExpandChildren

In suff.c r1.144 from yesterday, in the line "cp += nested_p - cp", I
accidentally removed the "- 1".  Since these "- 1" lines lead to slow
execution, each branch now increments the pointer separately by the
actually needed amount.

Fixing this bug posed way more new questions than it answered, and it
revealed an inconsistency in the parser about how characters are to be
escaped, and missing details in the documentation of Var_Parse, as well
as a parse error that unexpectedly doesn't stop make from continuing.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/usr.bin/make/parse.c
cvs rdiff -u -r1.144 -r1.145 src/usr.bin/make/suff.c
cvs rdiff -u -r1.490 -r1.491 src/usr.bin/make/var.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/dep-var.exp \
    src/usr.bin/make/unit-tests/dep-var.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index