You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[java-interop] Fix stack overflow when running on Linux (#156)
Java.Interop native code is built with `-std=c99` which, on Linux,
makes the **strdup**(3) and **realpath**(3) functions undeclared (they're not
part of the C99 standard). This poses a problem since both of them
return pointers and the assumed return value for an undeclared
function is an `int` - when running on a 64-bit system the "integer"
is cast to a pointer so that the high 32-bits of the resulting value
are set to 1 thus creating an invalid pointer.
This commit makes sure both functions are declared.
The commit also removes call to `gettid()` which does not have a
wrapper in glibc and should be called directly using `syscall(2)`.
0 commit comments