Skip to content

Missing cherry picks 6.1 #9691

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

Conversation

adrian-prantl
Copy link

No description provided.

@adrian-prantl adrian-prantl requested a review from a team as a code owner December 4, 2024 18:18
@adrian-prantl
Copy link
Author

@swift-ci test

@felipepiovezan
Copy link

We should not cherry-pick [lldb][test] Renable tests on asan builds, this has been reverted on the stable branch already

@adrian-prantl adrian-prantl force-pushed the missing-cherry-picks-6.1 branch from 8448bb8 to 2ca9e09 Compare December 4, 2024 22:39
@adrian-prantl
Copy link
Author

@swift-ci test

Copy link

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adrian-prantl adrian-prantl force-pushed the missing-cherry-picks-6.1 branch 4 times, most recently from e7bef92 to df3803e Compare December 5, 2024 00:46
@adrian-prantl
Copy link
Author

@swift-ci test

adrian-prantl and others added 13 commits December 5, 2024 08:43
The refactored code did not correctly determine the type of expression
errors.

rdar://139699028
(cherry picked from commit a3e2f0a)
The Mach-O load commands have an LC_SYMTAB / struct symtab_command which
represents the offset of the symbol table (nlist records) and string
table for this binary. In a mach-o binary on disk, these are file
offsets. If a mach-o binary is loaded in memory with all segments
consecutive, the `symoff` and `stroff` are the offsets from the TEXT
segment (aka the mach-o header) virtual address to the virtual address
of the start of these tables.

However, if a Mach-O binary is a part of the shared cache, then the
segments will be separated -- they will have different slide values. And
it is possible for the LINKEDIT segment to be greater than 4GB away from
the TEXT segment in the virtual address space, so these 32-bit offsets
cannot express the offset from TEXT segment to these tables.

Create separate uint64_t variables to track the offset to the symbol
table and string table, instead of reusing the 32-bit ones in the
symtab_command structure.

rdar://140432279
(cherry picked from commit 448ac7d)
…el. (llvm#117186)

Prior to this patch, the function returned an exit status, sometimes a
ValueObject with an error and a Status object. This patch removes the
Status object and ensures the error is consistently returned as the
error of the ValueObject.

(cherry picked from commit 6a8a4d5)
The old behavior was to return a null string in the error case,when
refactoring the error handling I thought it would be a good idea to
print the error in the description, but that breaks clients that try to
print a description first and then do something else in the error case.
The API is not great but it's clear that in-band errors are also not a
good idea.

rdar://133956263
(cherry picked from commit 7553fb1)

 Conflicts:
	lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
TypeSystemSwiftTypeRef::GetSwiftASTContext() may destroy and recreate
any of the SwiftASTContexts in its map of contexts, so clients need to
hold on to a shared pointer to avoid another thread destroying the
context while it is in use.

rdar://71278998
…ows (llvm#112928)

Member pointers refer to data or function members of a `CXXRecordDecl`,
which require a `MSInheritanceAttr` in order to be complete. Without that
we cannot calculate the size of a member pointer in memory. The attempt
has been causing a crash further down in the clang AST context. In order
to implement the feature, DWARF will need a new attribtue to convey the
information. For the moment, this patch teaches LLDB to handle to
situation and avoid the crash.

(cherry picked from commit c39692a)
This will enable us to share code and handle more functions similar to
swift_task_switch in a subsequent commit.

(cherry picked from commit 92b6c3c)
The use of `async let` in swift introduces two new trampolines that may
trigger a task switch:
1. `swift_asyncLet_get`, which gets called upon `await`ing an `async
   let` variable.
2. `swift_asyncLet_finish`, which gets called when the `async let`
   variable goes out of scope.

We need step through plans for both of those.

(cherry picked from commit 405a791)
The old code did not take the indentation into account.

(cherry picked from commit 8b2dff9)
(cherry picked from commit 3703aad)
…vm#116727)

depends on llvm#116711

[lldb] Improve rendering of inline diagnostics on the same column by
fixing the indentation and printing these annotations in the original
order.

Before

    a+b+c;
    ^ ^ ^
    | | error: 3
    | |note: 2b
    | error: 2a
    error: 1

After

    a+b+c;
    ^ ^ ^
    | | error: 3
    | error: 2a
    | note: 2b
    error: 1

(cherry picked from commit 6b4f675)
(cherry picked from commit 7e80550)
…lvm#116876)

Based on post-commit review feedback by Felipe Piovezan!

(cherry picked from commit 174899f)
(cherry picked from commit a4b1912)
llvm#115177)

Following up from llvm#112928, we
can reuse the approach from Clang Sema to infer the MSInheritanceModel
and add the necessary attribute manually. This allows the inspection of
member function pointers with DWARF on Windows.

(cherry picked from commit e9dd419)
@adrian-prantl adrian-prantl force-pushed the missing-cherry-picks-6.1 branch from df3803e to 3f342ba Compare December 5, 2024 16:43
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 61f615a into swiftlang:swift/release/6.1 Dec 5, 2024
3 checks passed
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.

5 participants