adsl/pppoe no longer connecting on 5.1
Kris Kennaway
kris at obsecurity.org
Wed Jun 11 23:05:59 PDT 2003
On Thu, Jun 12, 2003 at 07:18:12AM +0200, Wiktor Niesiobedzki wrote:
> On Wed, Jun 11, 2003 at 09:50:22PM -0700, Kris Kennaway wrote:
> > On Wed, Jun 11, 2003 at 10:48:32PM -0600, Andrew Lankford wrote:
> > > >Can you try backing out bsd.sys.mk to r1.26 and rebuild your world and
> > > >kernel? Later versions of this file are causing strange problems >with
> > > >package builds.
> > >
> > > I was a little lazy and just backed out bsd.sys.mk to 1.26 as you
> > > suggested, rebuilt /usr/lib/ , /usr/include/, and ppp. My kernel is the
> > > same as last time. As a result, ppp's now up and running again.
> >
> > Thanks, that's actually more useful because it isolates the problem.
> > It's probably something in ppp that is misbehaving with CSTD=c99.
> >
> alloca(3) function is misbehaving in ppp (namely ether.c). Is this a compiler
> bug?
It looks like gcc's inline alloca implementation allocates chunks in
larger chunks than the alloca.S implementation does. This (untested)
patch should make the alloca.S behaviour match that of gcc.
Kris
Index: i386/gen/alloca.S
===================================================================
RCS file: /usr/home/ncvs/src/lib/libc/i386/gen/alloca.S,v
retrieving revision 1.10
diff -u -r1.10 alloca.S
--- i386/gen/alloca.S 23 Mar 2002 02:44:18 -0000 1.10
+++ i386/gen/alloca.S 12 Jun 2003 06:00:52 -0000
@@ -47,8 +47,8 @@
popl %edx /* pop return addr */
popl %eax /* pop amount to allocate */
movl %esp,%ecx
- addl $3,%eax /* round up to next word */
- andl $0xfffffffc,%eax
+ addl $15,%eax /* round up to next word */
+ andl $0xfffffff0,%eax
subl %eax,%esp
movl %esp,%eax /* base of newly allocated space */
pushl 8(%ecx) /* copy possible saved registers */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20030611/16245c41/attachment.bin
More information about the freebsd-current
mailing list