Actions

icon Post
text/html Subscribe
text/html Unsubscribe

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

Re: [arm-gnu] strstr bug in newlib (2008q1)


  • To: "arm-gnu@xxxxxxxxxxxxxxxx" <arm-gnu@xxxxxxxxxxxxxxxx>
  • Subject: Re: [arm-gnu] strstr bug in newlib (2008q1)
  • From: Sam Clegg <sam@xxxxxxxxxxxxxxx>
  • Date: Tue, 30 Sep 2008 09:23:35 +0100

On Wed, 2008-06-11 at 15:57 -0700, Mark Mitchell wrote:
> Sam Clegg wrote:
> > Using the newlib that ships with the 2008q1 eabi toolchain we've found
> > the following code causes a crash in strstr():
> 
> Coincidentally, we were looking at an issue with strstr on another CPU 
> recently.  We believe that this was a problem in Newlib relating to the 
> definition of SIZE_MAX which has already been fixed by us.  If it's the 
> problem we think it is, the fix has been checked into both our 
> sourcebase and the upstream Newlib sourcebase.

This bug certainly seems to still exist on the current newlib CVS.  It
can be worked around by configuring with --enable-target-optspace or
compiling with -Os (since the critical_factorisation stuff is only used
if __OPTIMIZE_SIZE__ is undefined).

Do you guys (codesourcery) have a fix pending submission to newlib?
Should I submit a but with them?


Repro case for those without long mailing list history:

 const char* s1 = "GL_OES_byte_coordinates GL_OES_compressed_paletted_texture GL_OES_fixed_point GL_OES_point_size_array GL_OES_point_sprite GL_OES_read_format GL_OES_single_precision GL_IMG_texture_compression_pvrtc GL_IMG_texture_env_enhanced_fixed_function GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_IMG_user_clip_planes GL_OES_matrix_get GL_IMG_vertex_program GL_EXT_multi_draw_arrays GL_OES_matrix_palette GL_OES_draw_texture ";
 const char* s2 = "GL_IMG_texture_compression_pvrtc";
 const char* res = strstr(s1, s2);


-- 
sam clegg
sam@xxxxxxxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part