Skip to content

Apply some of the trimming patches to 1.12 #58321

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 6 commits into from
May 6, 2025

Conversation

gbaraldi
Copy link
Member

@gbaraldi gbaraldi commented May 5, 2025

gbaraldi and others added 6 commits May 5, 2025 14:21
Introduce `jl_image_buf_t` to represent the in-memory details of an
unparsed system image and clean-up several global variables and split
loading logic in staticdata.c so that we get (almost) everything we need
from the sysimage handle at once.

This allows sysimage loading to be separated into three phases:
  1. Lookup the raw sysimage buffer as a `jl_image_buf_t`
2. For .so sysimages, parse the sysimage and initialize JIT targets,
etc.
  3. Finally load the sysimage into a `jl_image_t`

Care was taken to preserve the existing behavior of calling
`jl_set_sysimg_so` to configure the sysimage before initializing Julia,
although this is likely to be next on the chopping block in a follow-up.

Dependent on #57523.
This adds `jl_pgcstack_default_func` to allow an uninitialized runtime to make it into `jl_autoinit_and_adopt_thread`

The init changes themselves are left to #57498

---------

Co-authored-by: Cody Tapscott <[email protected]>
…lier (#58231)

This changes the order of initialization slightly. The goal is to be
able to initialize executables and share libraries without having to
explicitly call init functions.

This still doesn't address the thread safety
This accidentally diverged when #58141 was merged without adjusting the
test to match (these tests shouldn't be re-implementing the `juliac`
link step anyway, but they currently do)

Unfortunately, this hid a bug where `jl_pathname_for_handle` does not
understand the main executable.
@topolarity
Copy link
Member

The Pkg failure seems to be the same on the backport branch: https://buildkite.com/julialang/julia-release-1-dot-12/builds/109#0196a1f6-bbf9-418b-ad5a-9e9fa118e4a0/885-929

@KristofferC KristofferC merged commit 4348e89 into backports-release-1.12 May 6, 2025
6 of 8 checks passed
@KristofferC KristofferC deleted the gb/release1.12 branch May 6, 2025 11:13
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