Index: third_party/buildbot_slave_8_4/buildslave/runprocess.py |
diff --git a/third_party/buildbot_slave_8_4/buildslave/runprocess.py b/third_party/buildbot_slave_8_4/buildslave/runprocess.py |
index 6a96b03ed9d3a4c6571ee9b83ff6ce6805eaa2c0..1b79a176a9ae87ac7e9301cda168fa9ec61f8011 100644 |
--- a/third_party/buildbot_slave_8_4/buildslave/runprocess.py |
+++ b/third_party/buildbot_slave_8_4/buildslave/runprocess.py |
@@ -212,6 +212,7 @@ class RunProcess: |
BACKUP_TIMEOUT = 5 |
KILL = "KILL" |
CHUNK_LIMIT = 128*1024 |
+ OUTPUT_LIMIT = 50*1024*1024 |
cmp
2014/06/10 15:51:22
Add an inline comment ("Limit is 50 MB.")
Did you
|
# Don't send any data until at least BUFFER_SIZE bytes have been collected |
# or BUFFER_TIMEOUT elapsed |
@@ -322,6 +323,7 @@ class RunProcess: |
self.buffered = deque() |
self.buflen = 0 |
self.buftimer = None |
+ self.totalOutputLength = 0 |
if usePTY == "slave-config": |
self.usePTY = self.builder.usePTY |
@@ -621,6 +623,11 @@ class RunProcess: |
""" |
n = len(data) |
+ self.totalOutputLength += n |
+ if self.totalOutputLength > self.OUTPUT_LIMIT: |
+ self.kill('output limit (%d) exceeded' % self.OUTPUT_LIMIT) |
+ return |
+ |
self.buflen += n |
self.buffered.append((logname, data)) |
if self.buflen > self.BUFFER_SIZE: |