Skip to content

couldn't load C-exported library #42659

@aviatesk

Description

@aviatesk
Member

Especially, I found :jl_coverage_visit_line couldn't be loaded:

julia> let 
           file = @__FILE__
           line = @__LINE__
           ccall(:jl_coverage_visit_line, Cvoid, (Cstring, Csize_t, Cint), file, sizeof(file), line)
       end
ERROR: could not load symbol "jl_coverage_visit_line":
dlsym(RTLD_DEFAULT, jl_coverage_visit_line): symbol not found
Stacktrace:
 [1] top-level scope
   @ ./REPL[1]:4

, which is defined at:

julia/src/codegen.cpp

Lines 1861 to 1869 in 72ec349

extern "C" JL_DLLEXPORT void jl_coverage_visit_line(const char* filename_, size_t len_filename, int line)
{
StringRef filename = StringRef(filename_, len_filename);
if (imaging_mode || filename == "" || filename == "none" || filename == "no file" || filename == "<missing>" || line < 0)
return;
std::vector<logdata_block*> &vec = coverageData[filename];
uint64_t *ptr = allocLine(vec, line);
(*ptr)++;
}

Bisected that #41936 seems to have caused this issue.

Activity

added
regressionRegression in behavior compared to a previous version
bugIndicates an unexpected problem or unintended behavior
on Oct 15, 2021
JeffBezanson

JeffBezanson commented on Oct 15, 2021

@JeffBezanson
SponsorMember

It might make sense to require explicitly requesting this from libjulia-codegen.

vtjnash

vtjnash commented on Oct 15, 2021

@vtjnash
SponsorMember

There's no particular reason that the interpreter should have to depend on having access to the compiler. Might need to move this to the runtime though.

JeffBezanson

JeffBezanson commented on Oct 15, 2021

@JeffBezanson
SponsorMember

Yeah I agree, it makes sense to keep the coverage and malloc data in the runtime.

simeonschaub

simeonschaub commented on Oct 24, 2021

@simeonschaub
Member

Is there a solution in sight for this? JuliaInterpreter now uses jl_coverage_visit_line, so this is quite breaking.

JeffBezanson

JeffBezanson commented on Oct 25, 2021

@JeffBezanson
SponsorMember

Yes I think this is not hard to fix.

added a commit that references this issue on Oct 26, 2021
8474339
added a commit that references this issue on Oct 27, 2021
d4b3f88
added a commit that references this issue on Oct 28, 2021
6a9737d
added a commit that references this issue on Oct 29, 2021
3a3b935

2 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @vtjnash@JeffBezanson@simeonschaub@aviatesk

    Issue actions

      couldn't load C-exported library · Issue #42659 · JuliaLang/julia