summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErkka Kääriä <erkka.kaaria@intel.com>2015-11-10 08:55:44 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2015-11-10 10:56:21 -0200
commit0d7ba0ff39a332b0f93c4958370b2c7db9ea0e30 (patch)
tree9a85916fbb406e7113d731ec34aa644621cfd2e2
parentfdd91aaec07e232fe5fdde316c3c97120ec25cd8 (diff)
downloadmeta-java-0d7ba0ff39a332b0f93c4958370b2c7db9ea0e30.tar.gz
ecj-initial.in: Disable multithreading to mitigate segfaulting
Cacao-initial-native suffers from sporadic segmentation faults, when the Java program uses multiple Java threads, due to a race condition. In particular, jamvm-native and classpath-native builds would occasionally fail as the eclipse compiler used during build task by default uses multiple threads. As fixing the race condition would require large changes to the cacao-initial-native codebase, and as it is only used briefly during the bootstrapping process, it is easier and safer to just force ecj-initial to run in a singlethreaded mode. Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rwxr-xr-xrecipes-core/ecj/files/ecj-initial.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/recipes-core/ecj/files/ecj-initial.in b/recipes-core/ecj/files/ecj-initial.in
index 2099991..30c1c8a 100755
--- a/recipes-core/ecj/files/ecj-initial.in
+++ b/recipes-core/ecj/files/ecj-initial.in
@@ -1 +1,3 @@
1${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} 1# -Djdt.compiler.useSingleThread=true forces the compiler to only use a single thread. This is a workaround to a race condition
2# bug in cacao-initial-native, where using multiple java thread could cause sporadic segmentation faults
3${RUNTIME} -Xmx512m -Djdt.compiler.useSingleThread=true -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"}