Bug in Cygwin-B20.1?

Radu Grosu grosu@saul.cis.upenn.edu
Tue Aug 10 09:15:00 GMT 1999

I took the java-jni/c example of Mumit and modified it as follows:

1. dhello2 (in hello2.dll) calls dhello1.
2. dhello1 (in hello1.dll) calls dhello.
3. dhello (in hello.dll) is Mumit's function.

4. hello2.dll is linked to the java program and built by using
hello1.lib (see hello2Make)
5. hello1.dll is built by using hello.lib (see hello1Make)

I built the libraries using an adapted version of Mumit's Makefile.cyg
to account for libraries. This worked fine.

Now I added a function pointer declaration in hello.c together with an
external dummy function:

extern void dummyHello(JNIEnv *, jobject);
void (*extFncPtr)(JNIEnv *, jobject) = dummyHello;

void dummyHello(JNIEnv *env, jobject obj){}

I also changed hello1.c by adding the following:

  extern void (*extFncPtr)(JNIEnv *,jobject);
  extFncPtr = dHello;

I recompiled and linked the code. Now starting the program with "java
Main" I get the following message:

            " JAVA caused and invalid page fault in module hello1.dll"

Is this a BUG of Cygwin-B20.1?

All the source and make files are in the attached gzipped, tar file. The
source codes are shorter (together) than this email.

Any help will be greatly appreciated.

With many thanks in advance,


More information about the Cygwin mailing list