This would fail due to reading from freed buffer with coreutils-5.0.91.
test $fail = 1 && diff out exp 2> /dev/null
rm -f in out exp
+# Ensure that xx02 contains just two newlines.
+# This would fail due to reading from freed buffer with coreutils-5.0.91.
+printf '\n\n' > exp
+cp xx02 out || fail=1
+cmp out exp || fail=1
+test $fail = 1 && diff out exp 2> /dev/null
+rm -f in out exp
+
# csplit would infloop
(echo; echo a) > in
csplit in '/a/-1' '{*}' > out || fail=1