Current-Users archive

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

Re: Cross-build failure on i386 in sh/init.c



On Thu, Feb 28, 2008 at 01:27:46AM -0700, Anthony Martinez wrote:
> On Thu, Feb 28, 2008 at 10:04:59AM +0200, Alan Barrett wrote:
> > 
> > Could you post a diff between the correct and incorrect versions of
> > init.c?  I'd be interested to see what dash is doing differently, and
> > figuring out whether the bug is in mkinit.sh or in dash.  (I think it's
> > more likely to be a dash bug.)
> 
> The unified diff is attached for preservation, though it really is just
> one line.

                      ckfree(memout.buf);
                      memout.buf =3D NULL;
              }
+      }
 }

That '}' comes from line 139:
138:                done
139:                ev="${ev}      }${nl}"
140:                eval event_$event=\"\$event_$event\$ev\"

Which is where all the '}' in that column get added.

later processed as:
181: echo "reset() {"
182: echo "${event_reset%$nl}"
183: echo "}"

So something data/length dependant must be happening!
Lines 182/183 could be replaced by:
     echo "${event_reset}}"

oh - the changes I made to mkinit.sh (rev 1.3) might even perterb
the data enough!

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index