Skip to content

cfunction ABI adapters not pre-compiled for CodeInstances from an existing sys/pkgimage #58758

@topolarity

Description

@topolarity

The logic here:

julia/src/aotcompile.cpp

Lines 607 to 608 in 45f5834

auto it = compiled_mi.find(mi);
if (it != compiled_mi.end()) {

expects to be able to find the target code for the cfunc ABI adapter in the current worklist. However, it's also possible for code to be available, e.g., in an external sys/pkgimage, in which case it won't end up in the worklist.

As a result, the ABI adapter does not end up pre-compiled.

This happens when pre-compiling REPL, where it uses Base.Timer functionality (

this, @cfunction(uv_timercb, Cvoid, (Ptr{Cvoid},)),
). We are unable to pre-compile the ABI adapter for Base.uv_timercb.

We should still be able to AOT-compile this adapter by "linking" to the external CodeInstance via a gvar, similar to what we already do when invoking external CodeInstances.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions