Segfault in re_string_reconstruct()

Hans-Christian Egtvedt hans-christian.egtvedt at atmel.com
Fri Oct 31 10:21:29 UTC 2008


On Fri, 31 Oct 2008 08:30:40 +0100
Hans-Christian Egtvedt <hans-christian.egtvedt at atmel.com> wrote:

> On Thu, 30 Oct 2008 13:01:08 -0500
> Rob Landley <rob at landley.net> wrote:
> > On Wednesday 29 October 2008 17:05:54 Bernhard Reutner-Fischer
> > wrote:
> > > On Thu, Oct 30, 2008 at 10:06:45AM +1300, Jeremy Bowen wrote:
> > > >On Monday 20 October 2008 5:54:14 pm Rob Landley wrote:

<snipp>

> > If you understand avr32 assembly, look at the assembly output via
> > "objdump -d" or in gdb.
> > 
> 
> I understand AVR32 assembly, so I just need details about toolchain
> used, which uClibc version and application to trigger this segfault.
> 

Disassembly regex.os gives me:

              if (pstr->trans)
     69e:       ee f8 ff f4     ld.w    r8,r7[-12]
     6a2:       70 c8           ld.w    r8,r8[0x30]
     6a4:       58 08           cp.w    r8,0
     6a6:       c0 b0           breq    6bc <re_string_reconstruct+0x196>
                c = pstr->trans[c];
     6a8:       ee f8 ff f4     ld.w    r8,r7[-12]
     6ac:       70 c9           ld.w    r9,r8[0x30]
     6ae:       ee f8 ff fc     ld.w    r8,r7[-4]
     6b2:       f2 08 00 08     add     r8,r9,r8
     6b6:       11 88           ld.ub   r8,r8[0x0]
     6b8:       ef 48 ff fc     st.w    r7[-4],r8

Which seems fine by me, however this is compiled with -O0, I'll recompile
with -O2.

<snipp>

-- 
Best regards,
Hans-Christian Egtvedt



More information about the uClibc mailing list