JVM interactions

"Julian Dolby" <[email protected]> Wed, 6 Sep 2017 18:55:58 +0000
Newsgroups gmane.comp.gnome.mono.general
Message-ID <OFE3621C1B.70D124B8-ON00258193.0066A8A0-00258193.00680039@notes.na.collabserv.com>
--===============8814828699682957919==
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<div class=3D"socmaildefaultfont" dir=3D"ltr" style=3D"font-family:Arial, H=
elvetica, sans-serif;font-size:10.5pt" ><div dir=3D"ltr" >&nbsp;I have been=
 trying to use C# code together with Java code, to provide program analysis=
 of .NET code as part of WALA (https://github.com/wala/WALA). &nbsp;Given t=
he seeming end of work on IKVM, I have been exploring using a small amount =
of C++ code and JNI to bridge the two systems. &nbsp;I have tried two optio=
ns:</div>
<div dir=3D"ltr" >&nbsp;</div>
<div dir=3D"ltr" >1) a C++ program that create a Mono VM and a JVM, loading=
 the needed code into both and then calls&nbsp;functions in the them. &nbsp=
;The Java code contains 'native' methods that call back into C++ and from t=
here to Mono.</div>
<div dir=3D"ltr" >&nbsp;</div>
<div dir=3D"ltr" >2) a Java program that calls C++ using JNI, which creates=
 a Mono VM and calls code in it, passing results (integers and strings) bac=
k to Java.</div>
<div dir=3D"ltr" >&nbsp;</div>
<div dir=3D"ltr" >&nbsp;In both cases, I get code that works fine up to a p=
oint, and then crashes with what appears to be a segmentation fault in the =
Mono memory allocator. &nbsp;Depending on what GC I choose, I get slightly =
different errors.</div>
<div dir=3D"ltr" >&nbsp;</div>
<div dir=3D"ltr" >&nbsp;Does anyone have a recommended recipe for doing wha=
t I need?</div>
<div dir=3D"ltr" >&nbsp;</div>
<div dir=3D"ltr" >&nbsp; &nbsp; Thanks,</div>
<div dir=3D"ltr" >&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Julian</div>
<div dir=3D"ltr" >&nbsp;</div></div><BR>


--===============8814828699682957919==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTW9uby1saXN0
IG1haWxsaXN0ICAtICBNb25vLWxpc3RAbGlzdHMuZG90Lm5ldApodHRwOi8vbGlzdHMuZG90Lm5l
dC9tYWlsbWFuL2xpc3RpbmZvL21vbm8tbGlzdAo=

--===============8814828699682957919==--