Skip to content

Fix: hide bundled turbojpeg symbols from libvncserver export table - #739

Open
M3ML1NE wants to merge 1 commit into
LibVNC:masterfrom
M3ML1NE:fix/auto-bounty-729-export-turbojpeg
Open

M3ML1NE wants to merge 1 commit into
LibVNC:masterfrom
M3ML1NE:fix/auto-bounty-729-export-turbojpeg

Conversation

@M3ML1NE

@M3ML1NE M3ML1NE commented Aug 11, 2026

Copy link
Copy Markdown

Fixes #729

Root Cause

When building libvncserver with bundled turbojpeg implementation (), in evaluated to empty string under GCC/Clang on Unix/Linux systems, causing GCC to export all symbols (, , , etc.) as global dynamic symbols in . Applications linking both and system would inadvertently bind calls to 's internal implementation.

Fix

Defined as for GCC compilers so internal symbols remain local/hidden within . Added a test in ensuring symbols are not exported.

Comment thread test/symbolstest.c
}
char command[1024];
snprintf(command, sizeof(command), "readelf -Ws %s | grep -E \" [A-Z]+ +GLOBAL +DEFAULT +[0-9]+ +tj\"", argv[1]);
int status = system(command);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exports conflicting turbojpeg functions

3 participants