The NetBSD Project

CVS log for src/tests/lib/libc/gen/t_vis.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / lib / libc / gen

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.9.6.1 / (download) - annotate - [select for diffs], Sat Dec 9 13:10:16 2023 UTC (2 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.9: +97 -1 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1923):

	lib/libc/gen/vis.c: revision 1.75-1.86
	tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

PR 56260: fix out-of-bounds stack read.

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

From Kyle Evans <kevans%FreeBSD.org@localhost>.
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
From Kyle Evans <kevans%FreeBSD.org@localhost>.

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need <stdint.h> for SIZE_MAX, per C standard.
From Kyle Evans <kevans%FreeBSD.org@localhost>.
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.

Revision 1.9.16.1 / (download) - annotate - [select for diffs], Sat Dec 9 13:09:04 2023 UTC (2 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.9: +97 -1 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1774):

	lib/libc/gen/vis.c: revision 1.75-1.86
	tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

PR 56260: fix out-of-bounds stack read.

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

From Kyle Evans <kevans%FreeBSD.org@localhost>.
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
From Kyle Evans <kevans%FreeBSD.org@localhost>.

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need <stdint.h> for SIZE_MAX, per C standard.
From Kyle Evans <kevans%FreeBSD.org@localhost>.
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.

Revision 1.9.24.1 / (download) - annotate - [select for diffs], Sat Dec 9 13:03:34 2023 UTC (2 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2
Changes since 1.9: +97 -1 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Pull up following revision(s) (requested by riastradh in ticket #485):

	lib/libc/gen/vis.c: revision 1.76-1.86
	tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

From Kyle Evans <kevans%FreeBSD.org@localhost>.
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
From Kyle Evans <kevans%FreeBSD.org@localhost>.

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need <stdint.h> for SIZE_MAX, per C standard.
From Kyle Evans <kevans%FreeBSD.org@localhost>.
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 12 12:48:53 2023 UTC (6 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -3 lines
Diff to previous 1.13 (colored)

vis(3): Fix one more buffer overrun in an edge case.

PR lib/57573

XXX pullup-10
XXX pullup-9
XXX pullup-8

Revision 1.13 / (download) - annotate - [select for diffs], Sat Aug 12 12:48:37 2023 UTC (6 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.12: +1 -5 lines
Diff to previous 1.12 (colored)

vis(3): Fix main part of PR lib/57573.

From Kyle Evans <kevans@FreeBSD.org>.

XXX pullup-10
XXX pullup-9
XXX pullup-8

Revision 1.12 / (download) - annotate - [select for diffs], Sat Aug 12 12:46:16 2023 UTC (6 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.11: +21 -1 lines
Diff to previous 1.11 (colored)

vis(3) tests: Test another overflow edge case.

Related to PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8

Revision 1.11 / (download) - annotate - [select for diffs], Sat Aug 12 12:45:03 2023 UTC (6 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.10: +40 -26 lines
Diff to previous 1.10 (colored)

vis(3) tests: Expand tests and diagnostic outputs on failure.

PR lib/57573

XXX pullup-10
XXX pullup-9
XXX pullup-8

Revision 1.10 / (download) - annotate - [select for diffs], Sat Aug 12 12:43:26 2023 UTC (6 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.9: +69 -1 lines
Diff to previous 1.9 (colored)

vis(3) tests: Add xfail test for encoding overflow.

From Kyle Evans <kevans@FreeBSD.org>.

PR lib/57573

XXX pullup-10
XXX pullup-9
XXX pullup-8

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:58 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.8: +5 -1 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

Sync with HEAD

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jan 10 15:16:57 2017 UTC (7 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-10-base, netbsd-10-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-9, netbsd-8, netbsd-10
Changes since 1.8: +5 -1 lines
Diff to previous 1.8 (colored)

PR/51806: Ngie Cooper: Only run the vis locale test if VIS_NOLOCALE is defined

Revision 1.8 / (download) - annotate - [select for diffs], Sat May 23 14:02:11 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.7: +32 -1 lines
Diff to previous 1.7 (colored)

Add a VIS_NOLOCALE test

Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 8 19:01:03 2014 UTC (9 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.6: +29 -1 lines
Diff to previous 1.6 (colored)

add null and empty tests.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:42:20 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.3.2.1: +7 -3 lines
Diff to previous 1.3.2.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.4.6.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:22 2013 UTC (11 years ago) by tls
Branch: tls-maxphys
Changes since 1.4: +7 -3 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

resync with head

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 13 04:51:56 2013 UTC (11 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, agc-symver-base, agc-symver
Changes since 1.5: +4 -2 lines
Diff to previous 1.5 (colored)

- check the results of the vis functions
- zero output to make sure things work
- don't use encodings that don't work
- fix the style on decoding

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 11 04:12:48 2013 UTC (11 years ago) by christos
Branch: MAIN
Changes since 1.4: +5 -3 lines
Diff to previous 1.4 (colored)

check the results of encoding and decoding

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Thu Nov 10 14:31:52 2011 UTC (12 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.3: +36 -4 lines
Diff to previous 1.3 (colored)

sync with head

Revision 1.4 / (download) - annotate - [select for diffs], Sun Nov 6 03:38:16 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: tls-maxphys
Changes since 1.3: +36 -4 lines
Diff to previous 1.3 (colored)

add tests for \x and \xx

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 7 10:02:53 2011 UTC (12 years, 7 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.2: +5 -6 lines
Diff to previous 1.2 (colored)

Move 't_syslog_pthread' to 't_syslog' for consistency with libc.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Mar 12 19:52:48 2011 UTC (12 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp
Changes since 1.1: +5 -11 lines
Diff to previous 1.1 (colored)

Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
  between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
  the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
  the buffer is not large enough, instead of silently truncating.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Dec 28 12:46:15 2010 UTC (13 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2

Migrate the remaining libc/gen tests to atf

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>