[PATCH] Re: glitch with strlen [was: Re: Shells in 1.1.2]

Bernhard Fischer rep.nop at aon.at
Fri May 5 21:09:33 UTC 2006


On Fri, May 05, 2006 at 02:26:12PM -0400, Rob Landley wrote:
>On Friday 05 May 2006 7:01 am, Bernhard Fischer wrote:
>> >This optimization helps at least with gcc which is what most people will
>> >use, probably.
>> >I suggested above that we don't rely on the preprocessor but fix the
>> >applets proper to use bb_strlen. This would IMO be a clean solution
>> >which is safe and trivial.
>> >
>> >Thoughts?
>>
>> Proposed real fix:
>> apply attached busybox.fix_strlen.01.diff
>
>Which removes bb_strlen() from the tree entirely, since nothing is now using 
>it.
>
>> and then replace all strlen() with bb_strlen() e.g. via
>
>Immense churn to work around a gcc bug, which presumably doesn't even affect 
>non-gcc compilers.  No.
>
>If you want to lobby the gcc folks to make -fno-builtin-strlen actually 
>_work_, feel free.

try
void foo(void){strlen("string");}
with and without -fno-builtin-strlen.

What is it that is not working? Please explain.
>
>> objections or can i go and check this in early next week?
>
>I object.

Noted.
>
>Rob
>-- 
>Never bet against the cheap plastic solution.
>



More information about the busybox mailing list