[Toybox] strlower() bug
Rob Landley
rob at landley.net
Tue May 14 10:14:54 PDT 2024
On 5/14/24 07:10, enh wrote:
> macOS tests seem to be broken since this commit?
>
> FAIL: find strlower edge case
> echo -ne '' | touch aaaaaⱥⱥⱥⱥⱥⱥⱥⱥⱥ; find . -iname aaaaaȺȺȺȺȺȺȺȺȺ
> --- expected 2024-05-10 17:32:56.000000000 +0000
> +++ actual 2024-05-10 17:32:56.000000000 +0000
> @@ -1 +0,0 @@
> -./aaaaaⱥⱥⱥⱥⱥⱥⱥⱥⱥ
Sigh. Apple's handling of utf8/unicode continues to be... "a challenge".
When I run "make test_find" standalone, it gives me:
scripts/runtest.sh: line 219: syntax error near unexpected token `;'
scripts/runtest.sh: line 219: ` R) LEN=0; B=1; ;&'
Because bash 3.2 from 2007 doesn't understand ;&
And THEN it goes:
touch: out of range or illegal time specification: YYYY-MM-DDThh:mm:SS[.frac][tz]
touch: out of range or illegal time specification: YYYY-MM-DDThh:mm:SS[.frac][tz]
FAIL: find newerat
echo -ne '' | find dir -type f -newerat @12345
--- expected 2024-05-14 11:16:40.000000000 -0500
+++ actual 2024-05-14 11:16:40.000000000 -0500
@@ -1 +0,0 @@
-dir/two
Which is a different error that DOESN'T happen with the global tests, because
those are using toybox touch rather than homebrew's $TOUCH. But it works on
debian. Let's see:
$ touch --version
touch: illegal option -- -
usage: touch [-A [-][[hh]mm]SS] [-achm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]]
[-d YYYY-MM-DDThh:mm:SS[.frac][tz]] file ...
Thank you, gnu project. I'm gonna assume this is _also_ from 2007. (I made
scripts/prereq/build.sh for a REASON...)
Then when I run "make clean macos_defconfig tests" I get:
Undefined symbols for architecture arm64:
"_iconv", referenced from:
_do_iconv in iconv.o
(maybe you meant: _iconv_main)
"_iconv_open", referenced from:
_iconv_main in iconv.o
ld: symbol(s) not found for architecture arm64
Because the Makefile has:
tests: ASAN=1
tests: toybox
scripts/test.sh
And ASAN apparently breaks on homebrew's toolchain but not debian's toolchain.
Why does it break there but not on Linux...
probe cc -Wall -Wundef -Werror=implicit-function-declaration
-Wno-char-subscripts -Wno-pointer-sign -funsigned-char
-Wno-deprecated-declarations -Wno-string-plus-int -Wno-invalid-source-encoding
-fsanitize=address -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
-xc -o /dev/null -
error: cannot parse the debug map for '/dev/null': The file was not recognized
as a valid object file
clang: error: dsymutil command failed with exit code 1 (use -v to see invocation)
Because it tries to read back the -o output we discarded, and fails when it
can't do so, thus all library probes fail and it tries to build with no
libraries. But only when ASAN is enabled, because ASAN uses -o as INPUT. Bravo.
None of this is the actual unicode failure, this is just ambient macos...
Rob
More information about the Toybox
mailing list