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: Sat, 31 Jul 2010 21:37:58 +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/31/2010 09:35 PM, Bruno Haible wrote:
Hi Paolo,

I pushed it now, thanks for the review!

After I added some more unit tests for u8_strchr, I see crashes and assertion
failures:

1)
         mem = (UNIT *) (page_boundary - 2 * sizeof (UNIT));
         mem[0] = 0x50;
         mem[1] = 0;
         ASSERT (u8_strchr (mem, 0x123) == NULL); /* crashes */

2)
         mem = (UNIT *) (page_boundary - 3 * sizeof (UNIT));
         mem[0] = 0x50;
         mem[1] = 0x50;
         mem[2] = 0;
         ASSERT (u8_strchr (mem, 0x123) == NULL); /* assertion failed */
3)
         mem = (UNIT *) (page_boundary - 3 * sizeof (UNIT));
         mem[0] = 0x50;
         mem[1] = 0x50;
         mem[2] = 0;
         ASSERT (u8_strchr (mem, 0x3456) == NULL); /* crashes */
4)
         mem = (UNIT *) (page_boundary - 4 * sizeof (UNIT));
         mem[0] = 0x50;
         mem[1] = 0x50;
         mem[2] = 0x50;
         mem[3] = 0;
         ASSERT (u8_strchr (mem, 0x23456) == NULL); /* crashes */

I'm applying the two attached patches: Bug fixes, then comments and tiny
optimizations.

Thanks!

Paolo



reply via email to

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