From owner-freebsd-java Mon Aug 20 20:31:37 2001 Delivered-To: freebsd-java@freebsd.org Received: from smtp03.mrf.mail.rcn.net (smtp03.mrf.mail.rcn.net [207.172.4.62]) by hub.freebsd.org (Postfix) with ESMTP id 9FFD437B409 for ; Mon, 20 Aug 2001 20:31:34 -0700 (PDT) (envelope-from archer@whichever.org) Received: from 207-172-221-40.s65.as2.xnb.nj.dialup.rcn.com ([207.172.221.40] helo=unknown.whichever.org) by smtp03.mrf.mail.rcn.net with esmtp (Exim 3.32 #2) id 15Z2GK-0004N3-00 ; Mon, 20 Aug 2001 23:31:33 -0400 Received: (from archer@localhost) by unknown.whichever.org (8.11.5/8.11.1) id f7L3VOv83406; Mon, 20 Aug 2001 23:31:25 -0400 (EDT) (envelope-from archer) Date: Mon, 20 Aug 2001 23:31:25 -0400 (EDT) Message-Id: <200108210331.f7L3VOv83406@unknown.whichever.org> From: Alexander Litvin To: Greg Lewis Cc: freebsd-java@freebsd.org Subject: Re: FreeBSD JDK1.2.2 Patchset 11??? In-Reply-To: <20010821094826.B12799@misty.eyesbeyond.com> X-Newsgroups: unknown.freebsd.java User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (FreeBSD/5.0-CURRENT (i386)) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >> 4. res_ functions call most of the syscalls directly (that >> is, like _socket(), _connect(), _sendto()). But there's >> one exclusion: res_send() calls send(). >> >> 5. And there's a reason: at some point send(2) syscall was >> eliminated from CURRENT. Rather, send() is implemented >> inside libc as _sendto(,,,,NULL,0). I'm not quite sure >> if the same can happen to STABLE. > > The source code for stable does precisely the same thing. I haven't > looked up what revision this occurred for, but that is definitely how > send() is implemented on 4.3 RELEASE. I checked that too. Yes, send() is implemented the same. But if you look at res_send() in STABLE, it at uses socket(), connect() and sendto(). Whereas CURRENT calls them as _socket(), _connect() and _sendto(). Thus, STABLE calls into wrappers for those in libhpi, but CURRENT bypasses wrappers for socket()/connect() and then calls send() wrapper. And -- boom! STABLE although calls _close() instead of close(), but that doesn't break things. >> 6. When res_send() calls send(), it ends up not in the libc's >> implementation, but in libhpi's wrapper. Which is not ready >> at all (because other things like socket() and connect() >> were called from res_send() directly as syscalls, that is as >> _socket() and _connect()). > > send hasn't become a weak symbol in your libc for some strange reason > has it? No, nm shows it as T. But as I understand, in this case it is not necessary for libc's send() to be weak. The libhpi's send is going to be called first anyway. -- #include To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message