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

ASAN: debug build fails #47698

Closed
maleadt opened this issue Nov 24, 2022 · 1 comment · Fixed by #51755
Closed

ASAN: debug build fails #47698

maleadt opened this issue Nov 24, 2022 · 1 comment · Fixed by #51755
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@maleadt
Copy link
Member

maleadt commented Nov 24, 2022

Trying to make a debug build of Julia under ASAN I'm running into:

ERROR: Unable to load dependent library libjulia-internal-debug.so.1
Message: libjulia-internal-debug.so.1: undefined symbol: __libc_siglongjmp

Use of this symbol was introduced by @Keno in #46336, and is intended to bypass the ASAN hook and directly call siglongjmp from glibc. I'm not sure why it isn't working; @vtjnash commented that this symbol has been named like that for 25 years. Disabling the redefinition and just using siglongjmp works around the compilation error.

objdump output:

objdump -t libjulia-internal-debug.so.1 | grep siglong
0000000000000000       F *UND*  0000000000000000              siglongjmp@GLIBC_2.2.5
0000000000000000         *UND*  0000000000000000              __libc_siglongjmp
@maleadt maleadt added the kind:bug Indicates an unexpected problem or unintended behavior label Nov 24, 2022
@brenhinkeller brenhinkeller added the kind:asan trophy case Bugs found using asan label Nov 24, 2022
@maleadt maleadt removed the kind:asan trophy case Bugs found using asan label Nov 26, 2022
@topolarity
Copy link
Member

On my system (Ubuntu 22.04), the symbol is still present in libc (you can see it in the objdump output of libc.so.6) but it's not published to the symbol tables.

I expect it's intended not to be exported, and we need to find another way to bypass the interceptor for siglongjmp

@maleadt maleadt mentioned this issue Oct 18, 2023
vtjnash added a commit that referenced this issue Nov 20, 2023
For the `sigsetjmp` bypass; looks like glibc removed the
`__libc_siglongjmp` symbol in glibc 2.34, so change to using the
approach taking by our `dlopen` wrapper instead.

Adopts topolarity's fixes from #50170
Resolves #47698

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
mkitti pushed a commit to mkitti/julia that referenced this issue Dec 9, 2023
For the `sigsetjmp` bypass; looks like glibc removed the
`__libc_siglongjmp` symbol in glibc 2.34, so change to using the
approach taking by our `dlopen` wrapper instead.

Adopts topolarity's fixes from JuliaLang#50170
Resolves JuliaLang#47698

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants