[Toybox] A couple of minor fixes
Mike Moreton
Mike.Moreton at frontier-silicon.com
Fri Jun 10 01:34:25 PDT 2016
> can you give an example that fails? toybox 0.7.1 works fine for me on Ubuntu's 14.04's 2.19 (ldd (Ubuntu
> EGLIBC 2.19-0ubuntu6.9) 2.19).
I guess first off I should say that we're using a library provided by a supplier, so who knows what patches it could have in it, or how it's been compiled.
It's the following line that appears to give the problem:
if (line) xprintf("%.*s%c", trim ? trim : INT_MAX/2, line, TT.outdelim);
For example "echo hello | grep hello" produces no output, while "echo hello | grep -n hello" gives "1:".
We're also cross-compiling for a 32 bit target on a 64 bit host, which made me suspicious about picking up the wrong include files, but I printed out INT_MAX/2 from grep, and it was 0x3fffffff, so that's OK.
I know this problem is in GLibC and should be fixed there, but in something like Toybox I think it's wise to be resilient and not use the "outer space" of the system unless there is no alternative. But then as my contribution level is low, the weight of my opinion is also low!
More information about the Toybox
mailing list