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 2/4] Detect EOL on-the-fly in strstr, strcasestr and memmem.


On 14/10/2012, at 8:09 PM, H.J. Lu wrote:

> On Tue, Oct 9, 2012 at 12:36 AM, Andreas Jaeger <aj@suse.com> wrote:
>> On Tuesday, October 09, 2012 20:11:16 Maxim Kuvyrkov wrote:
>>> On 9/10/2012, at 8:06 PM, Andreas Jaeger wrote:
>>>> On Monday, October 08, 2012 15:09:11 Carlos O'Donell wrote:
>>> ...
>>> 
>>>>> I'm reviewed this and it looks correct.
>>>>> 
>>>>> OK to checkin as long as you add comments for CHECK_AVAILABLE_AFTER
>>>>> in the header str-two-way.h or somewhere else.
>>>>> 
>>>>> I'd like this conditional to be well documented for future
>>>>> maintainers.
>>>> 
>>>> Could we have this backported to 2.16, please?
>>> 
>>> Andreas,
>>> 
>>> This fix is not needed on 2.16 as the patch that introduced the bug
>>> went into 2.17 trunk.
>> 
>> Thanks, then everything is fine.
> 
> It caused:
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=14716
> 
> Here is a patch for testcase.  It is also on hjl/pr14716 branch.

H.J., thanks once again for adding the testcase.  Please remember to commit it to master branch.

As for the bug, this is an embarrassing one.  In cleaning up macro definitions in str-two-way.h in my last patch AVAILABLE1_USES_J is equivalent to !CHECK_EOL, but I updated its uses as if it was equivalent to CHECK_EOL.  The attached patch fixes it.

The patch is trivial (once one compares macro definitions for AVAILABLE1_USES_J in patch for BZ 14602), and I will commit it shortly.

Thank you,

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics

Attachment: 0001-Fix-BZ-14716-memmem-crash.patch
Description: Binary data


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