Skip to content

Commit fc63682

Browse files
authored
Merge pull request swiftlang#32063 from JDevlieghere/backtrace-check-utf8
[Utils] Handle unicode characters in backtrace-check
2 parents f40b207 + 3bbc99e commit fc63682

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/Runtime/linux-fatal-backtrace.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// REQUIRES: lldb
77
// XFAIL: CPU=s390x
88

9-
// REQUIRES: rdar63666780
10-
119
// NOTE: not.py is used above instead of "not --crash" because %target-run
1210
// doesn't pass through the crash, and `not` may not be available when running
1311
// on a remote host.

utils/backtrace-check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ def main():
7272
found_stack_trace_start = False
7373
found_stack_trace_entry = False
7474
for line in lines:
75+
# In Python 2, string objects can contain Unicode characters.
76+
if sys.version_info.major == 2:
77+
line = line.decode('utf-8', 'replace')
78+
7579
line = line.rstrip('\n')
7680

7781
# First see if we found the start of our stack trace start. If so, set

0 commit comments

Comments
 (0)