corda/src
Stanisław Szymczyk de1f5c7b9f fix pthread mutex and condition leak
Hi,

I did some more tests with my x86 QNX Avian port and found one major problem
in Avian VM while trying to run Apache Ivy. The problem manifests as
follows:

1. MySystem::Thread X is created, during its creation pthread mutex and
conditional variable are initialized
2. Program runs for some time
3. MySystem Thread X is disposed, it's memory is freed (during garbage
collection I guess)
4. Program runs for some time
5. MySystem::Thread Y is created in exactly the same memory address as
MySystem::Thread X disposed in step 3 (I suppose that's due to the way
memory allocator works in Avian)
6. During MySystem::Thread Y creation pthread mutex and conditional variable
initialization fail silently with EBUSY. QNX documentation says it means
"The given mutex was previously initialized and hasn't been destroyed."
which is correct, because it's exactly in the same memory address as mutex
and conditional variable of MySystem::Thread X and they haven't been
destroyed during MySystem::Thread X disposal

Fortunately solution for this is easy, see the attached patch. Now Apache
Ivy works without any problems.

Regards,
Stanisław Szymczyk
2012-12-04 10:14:44 -07:00
..
binaryToObject clean up binary format code 2012-08-02 12:39:24 -06:00
lzma fix endianess bug in LZMA decoding 2012-06-06 12:58:24 -06:00
openjdk update copyright years 2012-05-11 17:43:27 -06:00
allocator.h update copyright years 2012-05-11 17:43:27 -06:00
arch.h update copyright years and increment version number 2011-07-13 08:25:21 -06:00
arm.cpp fix OS X 10.8 and iOS 6.0 builds 2012-10-03 13:36:51 -06:00
arm.h gcc define __ARM_PCS_VFP for -mfloat-abi=hard, use it to detect armhf builds. 2012-10-01 13:39:18 +02:00
arm.S use ldmneia on Clang < 4 and GCC, ldmiane on Clang >= 4 2012-10-03 17:01:00 -06:00
assembler.h update copyright years 2012-05-11 17:43:27 -06:00
boot-javahome.cpp update copyright years 2012-05-11 17:43:27 -06:00
boot.cpp update copyright years 2012-05-11 17:43:27 -06:00
bootimage-fields.cpp add optional LZMA support for compressing embedded JARs, boot images, and shared objects 2012-06-02 09:06:22 -06:00
bootimage-template.cpp more progress towards cross-architecture bootimage builds 2011-08-31 21:18:00 -06:00
bootimage.cpp update static table mapping code in bootimage.cpp to match machine.cpp 2012-10-06 15:30:59 -06:00
bootimage.h update copyright years 2012-05-11 17:43:27 -06:00
builtin.cpp rename package avian.avian_vm_resource to avian.avianvmresource 2012-10-06 15:33:24 -06:00
classpath-avian.cpp make JVM_GetSystemPackage a bit smarter 2012-09-24 17:43:34 -06:00
classpath-common.h Fix stacktrace when building with MSVC 2012-08-26 20:14:37 -06:00
classpath-openjdk.cpp fix abort in classpath-openjdk.cpp due to buffer overflow 2012-10-03 09:43:51 -06:00
common.h fix Win32 build regressions 2012-08-15 17:43:44 -06:00
compile-arm.S fix OS X 10.8 and iOS 6.0 builds 2012-10-03 13:36:51 -06:00
compile-powerpc.S abort on startup if Thread field offset constants don't match the real runtime values 2012-06-20 13:16:08 -06:00
compile-x86.S fix typo in compile-x86.cpp that broke 64-bit Windows continuations build 2012-07-10 16:23:45 -06:00
compile.cpp fix MSVC build regression 2012-10-13 13:09:24 -06:00
compiler.cpp fix bug which failed to preserve source site during multi-word move 2012-06-26 08:39:23 -06:00
compiler.h update copyright years 2012-05-11 17:43:27 -06:00
constants.h prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
continuations-x86.S fix stack alignment for i386 continuations build 2012-07-10 17:22:49 -06:00
environment.h clean up binary format code 2012-08-02 12:39:24 -06:00
finder.cpp rename package avian.avian_vm_resource to avian.avianvmresource 2012-10-06 15:33:24 -06:00
finder.h update copyright years 2012-05-11 17:43:27 -06:00
heap.cpp clear any weak/soft/phantom references to finalizable objects before queuing 2012-10-05 10:06:01 -06:00
heap.h implement Runtime.maxMemory for OpenJDK port 2012-08-29 18:32:45 -06:00
heapdump.cpp fix C++11 errors in heapdump.cpp 2012-06-28 10:30:49 -06:00
heapwalk.cpp add use-clang option for building with LLVM Clang instead of GCC 2012-06-01 17:43:42 -06:00
heapwalk.h update makefile to optionally build and use a boot image; various bugfixes 2008-11-29 16:08:14 -07:00
interpret.cpp Compile fix for GCC 4.7.2 in C++11 mode 2012-11-30 11:14:35 +01:00
jnienv.cpp Accept M and K suffixes for memory sizes like the java command 2012-11-12 22:35:58 +01:00
jnienv.h prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
lzma-decode.cpp fix endianess bug in LZMA decoding 2012-06-06 12:58:24 -06:00
lzma-encode.cpp add support for LZMA on Windows 2012-06-02 15:43:42 -06:00
lzma-util.h add support for LZMA on Windows 2012-06-02 15:43:42 -06:00
lzma.h add optional LZMA support for compressing embedded JARs, boot images, and shared objects 2012-06-02 09:06:22 -06:00
machine.cpp update static table class reference in updateClassTables 2012-10-06 15:25:12 -06:00
machine.h make JVM_GetSystemPackage a bit smarter 2012-09-24 17:43:34 -06:00
main.cpp handle missing classpath or jar file name gracefully 2012-08-13 08:36:36 -06:00
posix.cpp fix pthread mutex and condition leak 2012-12-04 10:14:44 -07:00
powerpc-regs.S enable Linux PowerPC build 2011-02-26 12:45:22 -07:00
powerpc.cpp fix integer shifts on PowerPC 2012-08-13 11:17:34 -06:00
powerpc.h fix PowerPC floating point argument and return value marshalling 2012-08-13 11:16:30 -06:00
powerpc.S fix PowerPC floating point argument and return value marshalling 2012-08-13 11:16:30 -06:00
process.cpp progress towards cross-architecture bootimage builds 2011-08-29 19:00:17 -06:00
process.h update copyright years 2012-05-11 17:43:27 -06:00
processor.h implement JNI methods needed by AWT 2012-08-11 06:56:19 -06:00
stream.h update copyright years and increment version number 2011-07-13 08:25:21 -06:00
system.h update copyright years 2012-05-11 17:43:27 -06:00
target-fields.h add support for FreeBSD 2012-08-02 10:41:41 -06:00
target.h abort on startup if Thread field offset constants don't match the real runtime values 2012-06-20 13:16:08 -06:00
thunks.cpp fix crash when encountering invokespecial call to abstract method 2011-07-17 19:54:55 -06:00
tokenizer.h fix reads of out-of-bounds values in tokenizer.h 2012-09-12 15:25:17 -06:00
type-generator.cpp fix field offset calculation mismatch between type-generator.cpp and machine.cpp 2012-08-11 06:58:07 -06:00
types.def Merge remote branch 'oss/master' into jdk7 2012-05-04 18:54:31 -06:00
types.h prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
util.cpp update copyright years 2012-05-11 17:43:27 -06:00
util.h update copyright years 2010-12-05 20:21:09 -07:00
vector.h more progress towards cross-architecture bootimage builds 2011-08-31 21:18:00 -06:00
windows.cpp fix Clang warnings in windows.cpp 2012-08-07 17:18:04 -06:00
x86.cpp fix 64-bit shifts on x86_32 (part 2) 2012-09-03 08:44:13 -06:00
x86.h add support for FreeBSD on x86_64 2012-08-02 10:49:32 -06:00
x86.S fix bad offset for SSE argument marshalling in x86.S 2012-08-01 11:20:41 -06:00
zlib-custom.h update copyright years 2012-05-11 17:43:27 -06:00
zone.h eliminate call stack recursion in compile method 2012-10-13 09:46:12 -06:00