Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2001 23:31:25 -0400 (EDT)
From:      Alexander Litvin <archer@whichever.org>
To:        Greg Lewis <glewis@eyesbeyond.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: FreeBSD JDK1.2.2 Patchset 11???
Message-ID:  <200108210331.f7L3VOv83406@unknown.whichever.org>
In-Reply-To: <20010821094826.B12799@misty.eyesbeyond.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>> 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 <signature.h>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108210331.f7L3VOv83406>