Skip to content
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

[stable, beta][CP] Please cherry pick "Don't export all symbols to the dynamic table" #53503

Closed
a-siva opened this issue Sep 12, 2023 · 3 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve merge-to-beta merge-to-stable

Comments

@a-siva
Copy link
Contributor

a-siva commented Sep 12, 2023

Commit(s) to merge

b8ee3a9

Target

stable, beta

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/325126 (stable)
https://dart-review.googlesource.com/c/sdk/+/326246 (beta)

Issue Description

Process terminates with handled exceptions in FFI library, We are seeing consistent process termination with the latest stable Dart executable on Linux with FFI (Please see #53267)

What is the fix

We were exporting all symbols to the dynamic table so that they could be looked up using dladdr for the profiler and backtracer. The symbols include our statically-linked libcxx, which can create trouble when another DSO has a different version of libcxx. Now we export only the VM embedding API functions (Dart_*) and use a specially produced table to do the symbolization.

Why cherry-pick

Users are hitting this issue as segmentation faults and there is no workaround for it.

Risk

low

Issue link(s)

#53267

Extra Info

No response

@a-siva a-siva added the cherry-pick-review Issue that need cherry pick triage to approve label Sep 12, 2023
@devoncarew devoncarew added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Sep 13, 2023
@itsjustkevin
Copy link
Contributor

@rmacnak-google @jakemac53 could you take a look at this cherry-pick?

@a-siva a-siva changed the title [stable][CP] Please cherry pick "Don't export all symbols to the dynamic table" [stable, beta][CP] Please cherry pick "Don't export all symbols to the dynamic table" Sep 18, 2023
copybara-service bot pushed a commit that referenced this issue Sep 25, 2023
We were exporting all symbols to the dynamic table so that they could be looked up using `dladdr` for the profiler and backtracer. The symbols include our statically-linked libcxx, which can create trouble when another DSO has a different version of libcxx. Now we export only the VM embedding API functions (`Dart_*`) and use a specially produced table to do the symbolization.

Bug: #53267
Change-Id: I50f8150d194a564c116d95383c28a1a2aba0714e
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/323702
Cherry-pick-request: #53503
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325126
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
@itsjustkevin itsjustkevin added merge-to-stable merge-to-beta cherry-pick-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. labels Sep 26, 2023
@itsjustkevin
Copy link
Contributor

Stable has been pushed, keeping this open until the beta is also released.

@a-siva
Copy link
Contributor Author

a-siva commented Sep 29, 2023

The next beta of Dart (Dart 3.2 Beta 3) is going to be released soon (Oct 11th) and so it doesn't seem to make sense to cherry pick the change into the current beta. The next beta will have the change.
Closing this issue.

@a-siva a-siva closed this as completed Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve merge-to-beta merge-to-stable
Projects
None yet
Development

No branches or pull requests

6 participants