Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-09-06 09:24:36 +0000
committerPaul Pazderski2019-09-10 17:21:13 +0000
commit10afa0452509c63806769551cbdf1767d91dea8e (patch)
tree3a162b9c065c2110434a663472be721c6164a11b
parent8b58ae64e75c26a5f03cd68d390b02dce4c5f07e (diff)
downloadeclipse.platform.debug-I20190912-1800.tar.gz
eclipse.platform.debug-I20190912-1800.tar.xz
eclipse.platform.debug-I20190912-1800.zip
Bug 550834 - Race condition in InputStreamMonitor can delay or blockI20190912-1800I20190911-1805I20190910-1800
user input to RuntimeProcess Change-Id: I3ab4a02664259039c1bcf5660294bb06d82ec1f4 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
-rw-r--r--org.eclipse.debug.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java8
-rw-r--r--org.eclipse.debug.core/pom.xml2
3 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.debug.core/META-INF/MANIFEST.MF b/org.eclipse.debug.core/META-INF/MANIFEST.MF
index 820ddc853..db620cc9d 100644
--- a/org.eclipse.debug.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.core; singleton:=true
-Bundle-Version: 3.14.0.qualifier
+Bundle-Version: 3.14.100.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.debug.core.DebugPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
index c6df05c1f..199b183d8 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -151,7 +151,11 @@ public class InputStreamMonitor {
}
try {
synchronized(fLock) {
- fLock.wait();
+ // Queue could receive more input between last empty check and
+ // lock acquire. See https://bugs.eclipse.org/550834
+ if (fQueue.isEmpty()) {
+ fLock.wait();
+ }
}
} catch (InterruptedException e) {
}
diff --git a/org.eclipse.debug.core/pom.xml b/org.eclipse.debug.core/pom.xml
index e0b8214fa..c021b8a07 100644
--- a/org.eclipse.debug.core/pom.xml
+++ b/org.eclipse.debug.core/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.core</artifactId>
- <version>3.14.0-SNAPSHOT</version>
+ <version>3.14.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

Back to the top