This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Inexplicable Parameter-Passing Phenomena w/MinGW GCJ
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Mittwoch, 10. September 2003 21:32 schrieb Mark Wielaard:
> Hi,
>
> On Wed, 2003-09-10 at 16:37, Andrew Haley wrote:
> > Mohan Embar writes:
> > > Good gravy. You're right. The call in impl.setOption() in
> > > DatagramSocket:
> > >
> > > ---------------------------------------8<---------------------
> > >------------- public synchronized void setSoTimeout(int
> > > timeout) throws SocketException {
> > > if (timeout < 0)
> > > throw new IllegalArgumentException("Invalid timeout: " +
> > > timeout);
> > >
> > > impl.setOption(SocketOptions.SO_TIMEOUT, new
> > > Integer(timeout)); }
> > > ---------------------------------------8<---------------------
> > >-------------
> > >
> > > ...ends up calling getOption() in
> > > natPlainDatagramSocketImplWin32.cc: and impl.getOption() ends
> > > up calling setOption with a totally bogus second parameter.
> >
> > [...]
> > <Deep Thought mode> All right, ... You're really not going to
> > like it.
> >
> > I would look at some assembly code. For whatever reason, the
> > caller and the called have different opinions about the method
> > table offset of setSoTimeout().
> >
> > I still wonder if the compiler might be looking at different
> > versions of DatagramSocket.
>
> This might or might not be related, but this code yells "Miranda
> Method!" to me. setOption() is defined in the interface
> SocketOptions, which is implemented (but not defined) in the
> abstract class DatagramSocketImpl and finally implemented in the
> class
> natPlainDatagramSocketImplXXX.
>
> I really simple thing to check would be to explicitly defined
> setOption() as an abstract method in the class DatagramSocketImpl.
Can Miranda bugs be platform specific ? it works here on Linux.
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/X39TWSOgCCdjSDsRAjB4AKCJCu4BP48A6LuHvliqfNfk3IeakACeNpJ9
L/MGFpNwk6rJN1HEsKpOzFA=
=XPC6
-----END PGP SIGNATURE-----