bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 0/5] Speed up uNN_chr and uNN_strchr with Boyer-Moore algo


From: Paolo Bonzini
Subject: Re: [PATCH v2 0/5] Speed up uNN_chr and uNN_strchr with Boyer-Moore algorithm
Date: Thu, 29 Jul 2010 17:43:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5

On 07/29/2010 05:36 PM, Bruno Haible wrote:
Paolo Bonzini wrote:
The point is that u8_mbtouc will look only one byte past the end of
a (valid or invalid) character

This is not guaranteed. If you call u8_mbtouc(&uc, needle, 4) you are
asserting that needle[0..3] are valid memory addresses.

In practice that's not what happens.  The code does guarantee what I wrote.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]