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

Auditor tries to dlopen libraries ignoring the march tag #1193

Open
giordano opened this issue Mar 23, 2022 · 0 comments · May be fixed by #1194
Open

Auditor tries to dlopen libraries ignoring the march tag #1193

giordano opened this issue Mar 23, 2022 · 0 comments · May be fixed by #1194

Comments

@giordano
Copy link
Member

At the moment the auditor tries to dlopen the library under this condition:

if platforms_match(platform, HostPlatform())
but

julia> platform = HostPlatform()
Linux x86_64 {cxxstring_abi=cxx11, julia_version=1.7.2, libc=glibc, libgfortran_version=5.0.0, libstdcxx_version=3.4.29}

julia> platform["march"] = "avx512"
"avx512"

julia> platforms_match(platform, HostPlatform())
true

this means that HostPlatform() matches anything derived from HostPlatform() which differs only on the march tag, which is ignored. In particular this means we'll try to dlopen an AVX512 library on the build machine, but for example on Yggdrasil we don't have an AVX512-equipped system, so we get an illegal instruction error.

We need a custom comparison strategy for the march key, similarly to what we do for the os_version in Julia Base: https://github.com/JuliaLang/julia/blob/62e0729dbc5f9d5d93d14dcd49457f02a0c6d3a7/base/binaryplatforms.jl#L287-L317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant