Skip to content

Merge 2020-04-01 into swift/tensorflow #1010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ae3f05b
Remove skip from 'TestSwiftConditionalBreakpoint' and 'TestSwiftStepp…
augusto2112 Mar 24, 2020
5714497
[Swift] Replace calls to FuncDecl::getName & EnumElementDecl::getName…
AnthonyLatsis Mar 25, 2020
ab18ed9
Add an algorithm for performing "optimal" layout of a struct.
rjmccall Mar 20, 2020
e7a91f2
[lldb/Test] XFAIL TestDataFormatterObjCNSError except for gmodules.
JDevlieghere Mar 26, 2020
5830dc5
Use optimal layout and preserve alloca alignment in coroutine frames.
rjmccall Mar 25, 2020
e0481bd
[ASan] Fix issue where system log buffer was not cleared after report…
delcypher Mar 25, 2020
1634e74
[SwiftASTContext] Add missing null check in ImportType
vedantk Mar 26, 2020
105b787
[dsymutil] Only set a translation lambda if the translator is valid
JDevlieghere Mar 27, 2020
b1b73d7
Merge pull request #987 from JDevlieghere/rdar60641222
JDevlieghere Mar 27, 2020
d59da0c
Merge commit 'b1b73d770995' from apple/stable/20200108 into swift/master
Mar 27, 2020
930f87d
Merge pull request #980 from JDevlieghere/xfail-TestDataFormatterObjC…
JDevlieghere Mar 27, 2020
d7c576c
Merge remote-tracking branch 'github/swift/master' into HEAD
ainu-bot Mar 27, 2020
081fb8a
Merge pull request #986 from vedantk/eng/PR-60734897
vedantk Mar 27, 2020
0c8dddf
Merge remote-tracking branch 'github/swift/master' into HEAD
ainu-bot Mar 27, 2020
639837c
Merge remote-tracking branch 'github/swift/master' into HEAD
ainu-bot Mar 27, 2020
0186eef
Only add `darwin_log_cmd` lit shell test feature when the log can be …
delcypher Mar 27, 2020
3aeec0a
[lldb/PlatformMacOSX] Re-implement GetDeveloperDirectory
JDevlieghere Mar 27, 2020
7533999
Merge pull request #983 from danliew-apple/cherry-pick-55986279
danliew-apple Mar 27, 2020
2b2bff3
Merge pull request #981 from rjmccall/continuation-alignment-5.2
rjmccall Mar 27, 2020
6287796
Merge commit '2fe2276d4ae4' from apple/stable/20200108 into swift/master
Mar 28, 2020
2fe2276
Merge pull request #991 from JDevlieghere/🍒/20200108/457eb05db67d201f…
JDevlieghere Mar 27, 2020
68be76b
[lldb] NFC: Update call to performNameBinding
hamishknight Mar 28, 2020
02feaef
Merge remote-tracking branch 'github/swift/master' into HEAD
ainu-bot Mar 29, 2020
8415456
[lldb/test] Fix Swift testsuite environemnt
fredriss Mar 29, 2020
bd76300
Merge pull request #995 from fredriss/fix-environment-for-realz
fredriss Mar 29, 2020
efacf74
Update for apple/swift#30717 (#996)
hamishknight Mar 30, 2020
6c69033
[DebugInfo] Ensure dead store elimination can mark an operand
Mar 30, 2020
d9ba731
[LoopVectorize] Fix crash on "getNoopOrZeroExtend cannot truncate!" (…
vedantk Mar 30, 2020
7ab7999
Merge pull request #998 from vedantk/cherry
vedantk Mar 30, 2020
659cfe5
Merge commit '7ab7999b705f' from apple/stable/20200108 into swift/master
Mar 30, 2020
1b7eab4
Merge remote-tracking branch 'github/swift/master' into HEAD
ainu-bot Mar 30, 2020
53a4923
Merge pull request #966 from augusto2112/remove_skip_lldb_swift_tests
adrian-prantl Mar 30, 2020
62f58f5
Move TypeSystemSwiftTypeRef into its own file. (NFC)
adrian-prantl Mar 21, 2020
7d07c56
Implement TypeSystemSwiftTypeRef::IsArrayType()
adrian-prantl Mar 21, 2020
e234b41
Implement TypeSystemSwiftTypeRef::IsFunctionType() (NFC)
adrian-prantl Mar 30, 2020
97bdf2b
Move all unimplemented Swift Typesystem functions into the base class…
adrian-prantl Mar 31, 2020
8b4148b
Merge pull request #949 from adrian-prantl/typeref-isarray
adrian-prantl Mar 31, 2020
aa70751
Merge pull request #1003 from adrian-prantl/typeref-unimplemented
adrian-prantl Mar 31, 2020
ab1ec7c
Fix crash when dyn_casting a potentially null value
augusto2112 Mar 28, 2020
0718eea
Improve reporting when type reconstruction fails
augusto2112 Apr 1, 2020
7ceb84a
Merge pull request #971 from AnthonyLatsis/rename-getfullname-lldb
CodaFi Apr 1, 2020
e7ae372
Merge pull request #994 from augusto2112/fix_crash_unkwnown_type
vedantk Apr 1, 2020
187b331
Target: print the message with formatting
compnerd Apr 1, 2020
4791058
Merge remote-tracking branch 'github/swift/master' into HEAD
ainu-bot Apr 2, 2020
06099c0
Merge pull request #1012 from compnerd/print-formatting
compnerd Apr 2, 2020
1c2ea76
Merge remote-tracking branch 'github/swift/master' into HEAD
ainu-bot Apr 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compiler-rt/lib/asan/asan_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ class ScopedInErrorReport {
BlockingMutexLock l(&error_message_buf_mutex);
internal_memcpy(buffer_copy.data(),
error_message_buffer, kErrorMessageBufferSize);
// Clear error_message_buffer so that if we find other errors
// we don't re-log this error.
error_message_buffer_pos = 0;
}

LogFullErrorReport(buffer_copy.data());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// UNSUPPORTED: ios
// REQUIRES: shell
// REQUIRES: darwin_log_cmd
// RUN: %clangxx_asan -fsanitize-recover=address %s -o %t
// RUN: { %env_asan_opts=halt_on_error=0,log_to_syslog=1 %run %t > %t.process_output.txt 2>&1 & } \
// RUN: ; export TEST_PID=$! ; wait ${TEST_PID}

// Check process output.
// RUN: FileCheck %s --check-prefixes CHECK,CHECK-PROC -input-file=%t.process_output.txt

// Check syslog output. We filter recent system logs based on PID to avoid
// getting the logs of previous test runs.
// RUN: log show --debug --last 2m --predicate "processID == ${TEST_PID}" --style syslog > %t.process_syslog_output.txt
// RUN: FileCheck %s -input-file=%t.process_syslog_output.txt
#include <cassert>
#include <cstdio>
#include <sanitizer/asan_interface.h>

const int kBufferSize = 512;
char *buffer;

// `readZero` and `readOne` exist so that we can distinguish the two
// error reports based on the symbolized stacktrace.
void readZero() {
assert(__asan_address_is_poisoned(buffer));
char c = buffer[0];
printf("Read %c\n", c);
}

void readOne() {
assert(__asan_address_is_poisoned(buffer + 1));
char c = buffer[1];
printf("Read %c\n", c);
}

int main() {
buffer = static_cast<char *>(malloc(kBufferSize));
assert(buffer);
// Deliberately poison `buffer` so that we have a deterministic way
// triggering two ASan reports in a row in the no halt_on_error mode (e.g. Two
// heap-use-after free in a row might not be deterministic).
__asan_poison_memory_region(buffer, kBufferSize);

// This sequence of ASan reports are designed to catch an old bug in the way
// ASan's internal syslog buffer was handled after reporting an issue.
// Previously in the no halt_on_error mode the internal buffer wasn't cleared
// after reporting an issue. When another issue was encountered everything
// that was already in the buffer would be written to the syslog again
// leading to duplicate reports in the syslog.

// First bad access.
// CHECK: use-after-poison
// CHECK-NEXT: READ of size 1
// CHECK-NEXT: #0 0x{{[0-9a-f]+}} in readZero
// CHECK: SUMMARY: {{.*}} use-after-poison {{.*}} in readZero
readZero();

// Second bad access.
// CHECK: use-after-poison
// CHECK-NEXT: READ of size 1
// CHECK-NEXT: #0 0x{{[0-9a-f]+}} in readOne
// CHECK: SUMMARY: {{.*}} use-after-poison {{.*}} in readOne
readOne();

// CHECK-PROC: DONE
printf("DONE\n");
return 0;
}
13 changes: 13 additions & 0 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,19 @@ def is_windows_lto_supported():
# much slower. Let's override this and run lit tests with 'abort_on_error=0'.
config.default_sanitizer_opts += ['abort_on_error=0']
config.default_sanitizer_opts += ['log_to_syslog=0']
if lit.util.which('log'):
# Querying the log can only done by a privileged user so
# so check if we can query the log.
exit_code = -1
with open('/dev/null', 'r') as f:
# Run a `log show` command the should finish fairly quickly and produce very little output.
exit_code = subprocess.call(['log', 'show', '--last', '1m', '--predicate', '1 == 0'], stdout=f, stderr=f)
if exit_code == 0:
config.available_features.add('darwin_log_cmd')
else:
lit_config.warning('log command found but cannot queried')
else:
lit_config.warning('log command not found. Some tests will be skipped.')
elif config.android:
config.default_sanitizer_opts += ['abort_on_error=0']

Expand Down
Loading