-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Do not use ThreadLocal $errno because this symbol is GLIBC_PRIVATE. #7496
Do not use ThreadLocal $errno because this symbol is GLIBC_PRIVATE. #7496
Conversation
…d therefore shall not be used by any other external programs.
Please provide background for this claim, what historical glibc versions we're breaking, ... |
@ysbaddaden, when running this script #!/bin/sh
echo >demo.cr 'puts "errno=#{Errno.value}."'
crystal build demo.cr
./demo
LD_DEBUG=bindings ./demo 2>&1 | grep -i errno on a system with glibc-2.26, you may get this output:
The important aspect is There are standard packaging tools which enforce that binaries to be packaged do not reference symbols they shall not reference. This means that current Crystal-generated binaries which access This pull request fixes that situation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the details. _errno_location
seems to have been introduced in glibc 2.2.5 (released in 2002), so we can hopefully use it without breaking anything.
One less ThreadLocal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @felixvf 👍
No description provided.