Skip to content

Merge bastille into swift main #1835

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 20 commits into from
Sep 24, 2020
Merged

Merge bastille into swift main #1835

merged 20 commits into from
Sep 24, 2020

Conversation

JDevlieghere
Copy link

No description provided.

jkorous-apple and others added 20 commits September 14, 2020 10:53
The FileSystem initialization depends on the reproducer mode. It has
been growing organically to the point where it deserves its own helper
function. This also allows for early returns to simplify the code.

(cherry picked from commit ed17b6f)
Eliminates value parameter for types that are not trivially copyable.

(cherry picked from commit 0d5fc82)
…er (NFC)

Add an abstract base class that can be used to create other directory
providers.

(cherry picked from commit c90ca0c)
When replaying the reproducer, lldb should source the .lldbinit file
that was captured by the reproducer and not the one in the current home
directory. This requires that we store the home directory as part of the
reproducer. By returning the virtual home directory during replay, we
ensure the correct virtual path gets constructed which the VFS can then
find and remap to the correct file in the reproducer root.

This patch adds a new HomeDirectoryProvider, similar to the existing
WorkingDirectoryProvider. As the home directory is not part of the VFS,
it is stored in LLDB's FileSystem instance.

(cherry picked from commit 73af341)
Extract all the provider related logic from Reproducer.h and move it
into its own header ReproducerProvider.h. These classes are seeing most
of the development these days and this reorganization reduces
incremental compilation from ~520 to ~110 files when making changes to
the new header.

(cherry picked from commit bb894b9)
…UUID

When replaying a reproducer captured from a core file, we always use
dsymForUUID for the kernel binary. When enabled, we also use it to find
kexts. Since these files are already contained in the reproducer,
there's no reason to call out to an external tool. If the tool returns a
different result, e.g. because the dSYM got garbage collected, it will
break reproducer replay. The SymbolFileProvider solves the issue by
mapping UUIDs to module and symbol paths in the reproducer.

Differential revision: https://reviews.llvm.org/D86389

(cherry picked from commit a842950)
This reverts commit 7518006.

This test apparently works on the Swift CI ubuntu bot, so it shouldn't be
XFAIL'd on Linux.

(cherry picked from commit ef7d22a)
Add a reproducer verifier that catches:

 - Missing or invalid home directory
 - Missing or invalid working directory
 - Missing or invalid module/symbol paths
 - Missing files from the VFS

The verifier is enabled by default during replay, but can be skipped by
passing --reproducer-no-verify.

Differential revision: https://reviews.llvm.org/D86497

(cherry picked from commit 297f69a)
This reverts commit 297f69a. It broke
the Fedora 33 x86-64 bot. See the review for more info.

(cherry picked from commit 7c80f2d)
Add a reproducer verifier that catches:

 - Missing or invalid home directory
 - Missing or invalid working directory
 - Missing or invalid module/symbol paths
 - Missing files from the VFS

The verifier is enabled by default during replay, but can be skipped by
passing --reproducer-no-verify.

Differential revision: https://reviews.llvm.org/D86497

(cherry picked from commit 3746906)
Since a842950 this test started using
the reproducer subsystem but we never initialized it in the test. The
Subsystem takes an argument, so we can't use the usual SubsystemRAII at the
moment to do this for us.

This just adds the initialize/terminate calls to get the test passing again.

(cherry picked from commit ef76686)
Make Reproducer compatbile with SubsystemRAII and use it in
LocateSymbolFileTest.

(cherry picked from commit 5212206)
Treat the home directory like the current working directory and always
capture both in the VFS.

(cherry picked from commit 426fa35)
Revert "[lldb] XFAIL TestMemoryHistory on Linux"
…200714

[Analyzer][WebKit] cherry-pick 2 more checkers
@JDevlieghere
Copy link
Author

@swift-ci please test

2 similar comments
@JDevlieghere
Copy link
Author

@swift-ci please test

@JDevlieghere
Copy link
Author

@swift-ci please test

@JDevlieghere JDevlieghere changed the base branch from swift/master to swift/main September 24, 2020 01:38
@JDevlieghere JDevlieghere changed the title Merge bastille into swift master Merge bastille into swift main Sep 24, 2020
@JDevlieghere
Copy link
Author

@swift-ci please test

1 similar comment
@JDevlieghere
Copy link
Author

@swift-ci please test

@JDevlieghere JDevlieghere merged commit 8c155f4 into swiftlang:swift/main Sep 24, 2020
@JDevlieghere JDevlieghere deleted the merge-bastille-into-swift-master branch September 24, 2020 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants