Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30d9dfc

Browse files
committed
Work around a JDK segfault
1 parent b804e58 commit 30d9dfc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,17 @@ local-install-plugins: build-plugins
5757
touch $(BUILD_WORKSPACE)/artifacts.xml
5858
$(ECLIPSE_AUTO) -initialize
5959

60+
# Work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=465693 (actually a JDK bug)
61+
# Otherwise the net.sf.j2s.java.core build wil segfault about half of the time.
62+
# Annoyingly, the segfault causes java to exit 0; I was unable to figure out why.
63+
# So we add some extra checks, testing for the absence of crash logs.
64+
BADMETHOD1 = org/eclipse/jdt/internal/compiler/parser/TypeConverter.decodeType
65+
WORKAROUND1 = -vmargs -XX:CompileCommand=exclude,$(BADMETHOD1)
6066
build-libs: local-install-plugins
67+
test ! -f *err*.log
6168
set -e; for i in $(CORE_J2SLIB); do \
62-
$(ECLIPSE_J2S) -cmd build -path $$PWD/sources/$$i; \
69+
$(ECLIPSE_J2S) -cmd build -path $$PWD/sources/$$i $(WORKAROUND1); \
70+
test ! -f *err*.log; \
6371
done
6472
mkdir -p sources/net.sf.j2s.lib/bin sources/net.sf.j2s.lib/j2slib
6573
cd sources/net.sf.j2s.lib/bin && jar xf ../library.jar

0 commit comments

Comments
 (0)