Visibility should default to "hidden" to avoid leaking implementation details

Bug #1856629 reported by James McCoy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libtickit
New
Undecided
Unassigned

Bug Description

While updating Debian's package from 0.2 to 0.3.2, dpkg-gensymbols reported that a bunch of tickit_hooklist_* functions had disappeared and a bunch of tickit_bindings_* functions had appeared. These aren't part of the public API (per tickit.h), but because the visibility isn't being set to hidden by default, they're leaking into the visible symbols of the library.

Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

Hmm.. This is a tricky one. I can just add

  __attribute__((visibility("internal")))

to them all (by stealing the INTERNAL macro from libvterm), but if I do that then t/08bindings.c fails to compile:

libtool --quiet --mode=link --tag=CC cc -o t/08bindings.t t/08bindings.lo libtickit.la t/taplib.lo t/mockterm.lo t/taplib-tickit.lo -lunibilium -L/home/leo/lib -ltermkey
/usr/bin/ld: t/.libs/08bindings.o: in function `delete':
08bindings.c:(.text+0x58): undefined reference to `tickit_bindings_unbind_event_id'
/usr/bin/ld: t/.libs/08bindings.o: in function `main':
08bindings.c:(.text+0x9c): undefined reference to `tickit_bindings_bind_event'
...

I don't imagine there's an easy fix to that, without just deleting the test :/

Revision history for this message
James McCoy (jamessan) wrote :

Interestingly, none of the symbols in vterm's vterm_internal.h (which have default visibility) show up in the symbol table like the bindings symbols do here. Not quite sure what the difference is.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.