[Toybox] ASan freaks out when using tsort in multicall binaries

Rob Landley rob at landley.net
Tue Oct 10 23:21:07 PDT 2023


On 10/9/23 19:53, Oliver Webb wrote:
>> I tested this. If I build toybox sed without ASAN the 1 megabyte search and
>> replace completes in 0.15 seconds. If I build it with ASAN, it takes 29.35
>> seconds. The gcc address sanitizer is slowing sed down 200 times.
> 
> Huh, now sed passes it's tests by being faster.
> And _also_ mkpasswd passes it's tests too. You'd think having a program counter of 0 would
> cause a segfault, or at least the program wouldn't pass it's tests. But apparently not

One "dereference null pointer" segfault failure that happens in make tests is if
you switch sh on, because the version in tree is broken by one of the recent
commits. (I have an open window for it, I fixed it but backed the fix out to
apply a different fix and have to recreate it...)

I'd like to figure out what's happening with mint's ASAN here, but it's not at
the top of my todo list. Nonzero chance that upgrading from devuan blackmail to
devuan detritus will get me a new gcc with fresh breakage I'll have to work
around, so I'm waiting to see, but I have so many windows open and trying to
close them tends to open new ones. (Every few months my laptop eventually
crashes or runs out of battery and I lose state, and that's my opportunity to do
that sort of thing...)

> The only command that fails for me now is du,
> The 3 tests that fail are "du counts symlinks without following", 
> "du -LH does not follow unspecified symlinks", and 
> "du -H does not follow unspecified symlinks"
> 
> All 3 give the same diff:
> 
> @@ -1 +1 @@
> -8      du_test
> +12     du_test

I'm aware. Haven't figured out a proper fix for it yet. :(

Rob


More information about the Toybox mailing list