This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Here are the updated diffs. Tests look ok but do not complete because of an (hopefully unrelated) compile error in string/tester.c.

Am 31.12.2014 um 10:47 schrieb Siddhesh Poyarekar:
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

Attachment: sort-test.sh.diff
Description: Text document

Attachment: strxfrm_l.c.diff
Description: Text document

Attachment: xfrm-test.c.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]