Skip to content

Need some help in analyzing a mixed traceback #276

Answered by texadactyl
texadactyl asked this question in Q&A
Discussion options

You must be logged in to vote

I wrote a C-language equivalent and blew up in that too, the same JVM library function call, namely Java_java_util_zip_Deflater_deflateBytesBytes. All the simpler function calls work just fine in C and Go with purego.

What's different? I am trying to deflate (compress, in normal English) a byte array. It turns out that byte arrays need help from some functions that are accessed via a vector stored in the primary JVM area that is represented with a pointer. The C calls look like this example: (*env)->SetByteArrayRegion(env, inputArray, 0, sizeof(input), (jbyte*)input);. There are several functions of the same form that are required to set up the input and extract the output for array-orien…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@texadactyl
Comment options

@TotallyGamerJet
Comment options

@texadactyl
Comment options

Answer selected by texadactyl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants