Skip to content

JNAerated libraries crash or hang in printf on win32 #39

@ochafik

Description

@ochafik

From @leahxschmidt on December 27, 2012 16:37

To reproduce, do the following, on a 32-bit Windows XP system (I am using a 32-bit VM on a 64-bit host, if that matters).

Install cygwin, including gcc, and make.

git clone https://github.com/leahxschmidt/testjnaerator.git
cd testjnaerator
make
cd java
javac -cp test_linux.jar:. JavaTest.java
java -cp test_linux.jar:. -Djna.nosys=true JavaTest

now, manually extract the jar -- see #351

jar xf test_win32.jar
java -cp . -Djna.library.path=lib/win32/ JavaTest

For me, this hangs. But I have tried a bunch of variants on the C code and some also make the JVM crash in cygwin's aclcheck function (I think inet_addr typically does this). On 64-bit Windows XP, this code runs correctly (well, the printf stuff gets printed after the Java println but I assume this is due to buffering; that doesn't bother me).

Copied from original issue: nativelibs4java/nativelibs4java#352

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions