Skip to content

Conversation

@vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 27, 2022

This adds support for most of the default configuration on most common
platforms (combinations of glibc/Darwin + AArch64/ARM/x86/x86_64). It
was already fully supported for Windows x86 and x86_64.

I would add support here for musl (since it is trivial), but they explicitly prohibit doing so, via their header design, as an intentional choice, so I don't know how to auto-detect support for it in the build to work around that.

A simple demo is:

julia> for t in ccall(:jl_live_tasks, Any, ()); println(t); ccall(:jlbacktracet, Cvoid, (Any,), t); println(); end

This adds support for most of the default configuration on most common
platforms (combinations of glibc/Darwin + AArch64/ARM/x86/x86_64). It
was already fully supported for Windows x86 and x86_64.

I would add support here for musl (since it is trivial), but they
explicitly prohibit via their headers as a design choice, so I don't
know how to auto-detect support for it in the build.
{
#if defined(__GLIBC__)
#if defined(_CPU_X86_)
// from https://github.com/bminor/glibc/blame/master/sysdeps/unix/sysv/linux/i386/sysdep.h
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nicer to use permalinks instead of referencing master

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these intentionally reference blame, since if the code changes any, I want that to be very obvious there to the reader

@jpsamaroo
Copy link
Member

jpsamaroo commented Apr 27, 2022

Is it possible to just assume that non-glibc means musl? It's most likely far more common than uClibc and other libc's on Linux. And if other libc's have a way to identify themselves, then assuming anything else is musl seems reasonably safe.

@vtjnash
Copy link
Member Author

vtjnash commented Apr 28, 2022

musl explicitly does not want to be given support in this (this PR is "badly wrong"). Unless they change their position, I am inclined not to support it therefore (https://www.openwall.com/lists/musl/2013/03/29/13)

@giordano
Copy link
Member

This PR introduced a lot of new compilation warnings on aarch64-linux-gnu, including "outside array bounds": #45400 (comment)

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.

4 participants