From 0d7ba0ff39a332b0f93c4958370b2c7db9ea0e30 Mon Sep 17 00:00:00 2001 From: Erkka Kääriä Date: Tue, 10 Nov 2015 08:55:44 +0200 Subject: ecj-initial.in: Disable multithreading to mitigate segfaulting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä Signed-off-by: Otavio Salvador --- recipes-core/ecj/files/ecj-initial.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ -${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} +# -Djdt.compiler.useSingleThread=true forces the compiler to only use a single thread. This is a workaround to a race condition +# bug in cacao-initial-native, where using multiple java thread could cause sporadic segmentation faults +${RUNTIME} -Xmx512m -Djdt.compiler.useSingleThread=true -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} -- cgit v1.2.3-54-g00ecf