ATTN Windows Users: RFC - GCJ/MinGW and Thread-Safe Exception Handling

Ranjit Mathew rmathew@gmail.com
Tue Jul 4 02:50:00 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

  We have a hack in GCJ for MinGW that fools the MinGW runtime
into thinking that thread-safe exception handling is to be
used and causes a leak of about 24 bytes of EH context per
thread as a side-effect.

See:

  http://gcc.gnu.org/ml/java/2003-04/msg00046.html

This has worked all this while except that it is now causing
multiple definition errors from the linker while creating
tools like gappletviewer, etc. since these symbols are already
defined in libmingw32 (don't ask me why we haven't faced this
issue before - I'm flummoxed myself). In other words, it just
cannot continue to remain in its current form.

I am of the personal opinion that this hack should be removed
and therefore will be proposing a patch shortly that removes
this hack and adds the equivalent of "-mthreads" to the linking
step.

However, this means that all GCJ/MinGW executables will have
to be distributed with "mingwm10.dll" (32K), even if they are
otherwise statically linked with libgcj. (Or ask the user to
ensure that this DLL is in a folder that is present in the
PATH.)

Is this OK?

If not, please work on a patch to resolve the current
linking issue affecting the build of GCJ/MinGW. ;-)

Thanks,
Ranjit.

- --
Ranjit Mathew       Email: rmathew AT gmail DOT com

Bangalore, INDIA.     Web: http://rmathew.com/




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEqdeQYb1hx2wRS48RAvTUAJ440+eWOfmCJgPFjcIV1/hkWVpndgCfV50x
UyHRHL4AUvqjHbdjeHP62lE=
=sLnf
-----END PGP SIGNATURE-----



More information about the Java mailing list