Skip to content

Commit 4910e29

Browse files
---
yaml --- r: 125408 b: refs/heads/try c: 9513a4b h: refs/heads/master v: v3
1 parent 53505e3 commit 4910e29

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 692077b6431460b96beb0ccf4f38299618d51db2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: f693f267c71a79c0c9bb723dd39ad14634ea4502
5+
refs/heads/try: 9513a4b046055d991ec27c30c0d3f6cf0f1dc40b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/etc/lldb_batchmode.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ def execute_command(command_interpreter, command):
8282
if res.HasResult():
8383
print(normalize_whitespace(res.GetOutput()), end = '\n')
8484

85-
time.sleep(0.2)
86-
8785
# If the command introduced any breakpoints, make sure to register them with the breakpoint
8886
# callback
8987
while len(new_breakpoints) > 0:
@@ -114,18 +112,18 @@ def start_breakpoint_listener(target):
114112
def listen():
115113
print_debug("Started listening...")
116114
event = lldb.SBEvent()
117-
wait_count = 0
115+
listening_start_time_secs = time.clock()
116+
MAX_LISTENING_TIME_SECS = 10
118117
try:
119-
while wait_count < 5:
118+
while time.clock() < (listening_start_time_secs + MAX_LISTENING_TIME_SECS):
120119
if listener.WaitForEvent(1, event):
121120
if lldb.SBBreakpoint.EventIsBreakpointEvent(event) and \
122121
lldb.SBBreakpoint.GetBreakpointEventTypeFromEvent(event) == \
123122
lldb.eBreakpointEventTypeAdded:
124123
global new_breakpoints
125124
breakpoint = lldb.SBBreakpoint.GetBreakpointFromEvent(event)
126125
print_debug("breakpoint added (not really...), id = " + str(breakpoint.id))
127-
# new_breakpoints.append(breakpoint.id)
128-
wait_count += 1
126+
new_breakpoints.append(breakpoint.id)
129127
except:
130128
print_debug("breakpoint listener shutting down")
131129

branches/try/src/librustc/back/link.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,10 +1055,21 @@ fn link_rlib<'a>(sess: &'a Session,
10551055
let bc_deflated = obj_filename.with_extension("bytecode.deflate");
10561056
match fs::File::open(&bc).read_to_end().and_then(|data| {
10571057
fs::File::create(&bc_deflated)
1058-
.write(match flate::deflate_bytes(data.as_slice()) {
1059-
Some(compressed) => compressed,
1060-
None => sess.fatal("failed to compress bytecode")
1061-
}.as_slice())
1058+
.write({
1059+
let compressed = match flate::deflate_bytes(data.as_slice()) {
1060+
Some(compressed) => compressed,
1061+
None => sess.fatal("failed to compress bytecode")
1062+
};
1063+
1064+
let mut data_copy: Vec<u8> = Vec::with_capacity(compressed.as_slice().len() + 1);
1065+
data_copy.push_all(compressed.as_slice());
1066+
1067+
if compressed.as_slice().len() % 2 != 0 {
1068+
data_copy.push(0u8);
1069+
}
1070+
1071+
data_copy
1072+
}.as_slice())
10621073
}) {
10631074
Ok(()) => {}
10641075
Err(e) => {

0 commit comments

Comments
 (0)