[PATCH][BZ #16009] fix memory handling in strxfrm_l

Siddhesh Poyarekar siddhesh@redhat.com
Wed Dec 31 09:53:00 GMT 2014


On Wed, Dec 31, 2014 at 10:36:11AM +0100, Leonhard Holz wrote:
> I want to object here. The needed cache size can be in a region where the
> malloc will not fail but hurt the system performance considerable
> (swapping), especially as the malloced size is five times the string size. I
> think that low level functions like strxfrm should not carry such risks.

Fair enough.  In that case just mention in a comment that the size
you've chosen is arbitrary and only ensures that it is small enough to
be contained on the stack.  If someone wants to prove that the size is
optimal (or another size is optimal) then they can do that on top of
your change.

Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20141231/d58528c8/attachment.sig>


More information about the Libc-alpha mailing list