The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/opt-file.mk

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Apr 1 12:26:02 2024 UTC (11 months, 3 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +8 -4 lines
make: exit immediately after reading a null byte from a makefile

The chance of other garbage bytes in such a file is just too high.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Mar 26 13:32:31 2022 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3 lines
make: clean up comments

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Dec 9 20:47:33 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +8 -4 lines
make: add back support for jemalloc 100

The ports sun2 and vax default to jemalloc 100, as opposed to the rest
of the ports, which use jemalloc 510.  Some developers choose to use
jemalloc 100, so let them run the tests with memory debugging as well.

Suggested by mrg on source-changes-d.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Dec 5 14:57:36 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -2 lines
tests/make: migrate to jemalloc > 100

When I started working on usr.bin/make in 2020, I used NetBSD 8, which
used jemalloc 100.

After updating to NetBSD 8 to 9.99.x, the debugging options for jemalloc
stopped working since MALLOC_OPTIONS had been replaced with MALLOC_CONF
in 2019.

Enable malloc debugging again, to reliably reproduce the use-after-free
for the variable modifier ':@'.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Apr 4 10:13:09 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
make: remove filler word 'Do' from function names for parsing

No functional change, except for debug logging.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Dec 22 08:57:23 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -4 lines
make(1): fix comment in test about null bytes in makefiles

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Dec 22 08:51:30 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +10 -1 lines
make(1): re-add improved assertion in ParseGetLine

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Dec 22 08:23:12 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -1 lines
make(1): clean up after test opt-file

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Dec 22 08:05:08 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +10 -1 lines
make(1): fix assertion failure for files without trailing newline

Previously, mmapped files didn't always have the final newline added.
Only those that ended at a page boundary did.

This confused ParseRawLine, which assumed (and since parse.c 1.510 from
moments ago also asserted) that every line ends with a newline, which
allows the code to assume that after a backslash, there is at least one
other character in the buffer, thereby preventing an out-of-bounds read.

This bug had been there at least since parse.c 1.170 from 2010-12-25
04:57:07, maybe even earlier, I didn't check.

Now line_end always points to the trailing newline, which allows
ParseGetLine to overwrite that character to end the string.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Dec 6 20:55:30 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +22 -3 lines
make(1): document undefined behavior from 2014

Earlier versions of make didn't know the -v option to print the expanded
value of a variable.  To make the test runnable by older makes as well,
switch to -V instead, which has been available much longer.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Dec 6 20:33:44 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +8 -4 lines
make(1): error out on null bytes in makefiles

Makefiles are text files, they must not contain null bytes.

The previous code in this area was rotten anyway.  It assumed that
buf_end could be NULL even if buf_ptr was a valid pointer, which is no
longer true, probably since a few years already.

Continuing parsing after a null byte does not make sense.  If there's a
null byte in a text file, that file is corrupted, and parsing it leads
to unintended effects easily.  Therefore the only sensible action is to
stop parsing immediately.

The check whether cf->readMore could be null was outdated as well, which
previously made the fatal error impossible to reach.  Because of the
missing unit tests, nobody noticed this though.

The "exit status 0" in opt-file.exp is worring but that's due to another
bug and will be fixed in a follow-up commit.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Dec 6 20:07:25 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +36 -2 lines
make(1): document how make behaved for null bytes in the makefile

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Dec 6 19:18:26 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +15 -3 lines
make(1): add test for makefile containing null bytes

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Dec 6 19:00:48 2020 UTC (4 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +10 -1 lines
make(1): test parsing a makefile that ends in a backslash

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Aug 16 14:25:16 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -2 lines
make(1): describe the purpose of each newly added unit test dummy

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Aug 16 12:07:51 2020 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>