Open GoogleCodeExporter opened 9 years ago
a relevant link: https://code.google.com/p/address-sanitizer/wiki/AsanAsDso
You may try to LD_PRELOAD asan built as a shared library, but in that case
the warranty is void. You may also try to build the jvm launcher with asan
(AFIACT, the main jvm is a .so linked to a tiny launcher program, but I am not
an expert there)
Original comment by konstant...@gmail.com
on 28 Feb 2014 at 7:50
Thanks! I had seen wiki page, and will be following up w/gcc version of ASAN
as a start, since that at least should be supported.
I'm curious if you expect the current limitation to change, and if so when? As
you point out, even the JVM is largely just a bunch of shared objects, and that
technique of putting functionality into shared objects is pretty common on a
lot of projects I work on, which is not surprising given that it gives a lot of
flexibility.
Original comment by wtor...@gmail.com
on 28 Feb 2014 at 2:20
Still having problems, but dont know if they are caused by jvm, our (jni) code
or some interaction w/jvm.
jvm segv's w/following:
[Loaded java.io.PushbackInputStream from
/home/btorpey/jdk1.6.0_21/jre/lib/rt.jar]
[Loaded java.util.zip.Checksum from /home/btorpey/jdk1.6.0_21/jre/lib/rt.jar]
[Loaded java.util.zip.CRC32 from /home/btorpey/jdk1.6.0_21/jre/lib/rt.jar]
ASAN:SIGSEGV
=================================================================
==6168== ERROR: AddressSanitizer: SEGV on unknown address 0x7f7293cf3f80 (pc
0x7f729304320d sp 0x7f72928f2390 bp 0x7f72928f23f0 T1)
AddressSanitizer can not provide additional info.
#0 0x7f729304320c (/home/btorpey/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so+0x44920c)
#1 0x7f7292172401 (/home/btorpey/jdk1.6.0_21/jre/lib/amd64/libzip.so+0x3401)
#2 0x7f728f1d54c5 (+0x664c5)
Thread T1 created by T0 here:
#0 0x7f7293d04c2b (/usr/local/lib64/libasan.so.0.0.0+0xac2b)
#1 0x400058ea (/home/btorpey/jdk1.6.0_21/bin/java+0x400058ea)
==6168== ABORTING
Curious if anyone has any suggestions, or knows of successful attempt(s) to use
ASAN w/JNI code running in JVM.
TIA!
Original comment by wtor...@gmail.com
on 7 Mar 2014 at 5:59
Never mind -- the problem was in some scripts that launch the jvm. Launching
from the command line works like a charm!
Original comment by wtor...@gmail.com
on 7 Mar 2014 at 7:26
FYI we've added support for this in trunk Clang/compiler-rt (you'll need to
cmake with -DCOMPILER_RT_BUILD_SHARED_ASAN=ON - see
http://code.google.com/p/address-sanitizer/wiki/AsanAsDso for more details).
Original comment by tetra2...@gmail.com
on 1 Apr 2014 at 4:33
Thanks for the heads-up! I've been successfully using AddressSanitizer with
gcc for a while now, and it works like a charm (even with the JVM). In fact,
it helped find a bug that would have been very difficult to identify -- I wrote
a little about the process on my blog
(http://btorpey.github.io/blog/2014/03/27/using-clangs-address-sanitizer/).
I'm also using clang for static analysis, but so far we're still building
executables w/gcc.
Again, thanks for putting such a terrific tool out there!
Original comment by wtor...@gmail.com
on 13 Apr 2014 at 2:10
Perhaps close as not-a-bug?
Original comment by tetra2...@gmail.com
on 12 Apr 2015 at 11:55
[deleted comment]
I don't know if this is a bug or not, but fwiw I've managed to work around this
issue by creating a C++ executable to invoke JVM using JNI, which allows me to
compile and link asan statically using clang, as opposed to gcc.
With that configuration asan works like a charm, and I don't see these spurious
crashes.
Thanks again.
Original comment by wtor...@gmail.com
on 12 Apr 2015 at 2:56
Original comment by ramosian.glider@gmail.com
on 30 Jul 2015 at 9:05
Adding Project:AddressSanitizer as part of GitHub migration.
Original comment by ramosian.glider@gmail.com
on 30 Jul 2015 at 9:06
Original issue reported on code.google.com by
wtor...@gmail.com
on 27 Feb 2014 at 9:56