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

Impossible to use from Awesome WM due to the context_new function implementation being overriden by libselinux.so.1 #4

Open
p-himik opened this issue Mar 2, 2024 · 0 comments

Comments

@p-himik
Copy link

p-himik commented Mar 2, 2024

$ lua
Lua 5.3.6  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> require('lua_libpulse_glib').new():context('a')
pulseaudio.context: 0x55ddb22b3a38
>

But:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libselinux.so.1 lua
Lua 5.3.6  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> require('lua_libpulse_glib').new():context('a')
>

Seems like this function overrides the one from this library: https://www.mankier.com/3/context_new.

The fix would be to replace #define LUA_MOD_EXPORT extern (extern on defined functions doesn't make sense anyway, AFAIK) with #define LUA_MOD_EXPORT __attribute__((visibility("default"))) and to add -fvisibility=hidden to CFLAGS in the Makefile.

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

No branches or pull requests

1 participant