[lsb-discuss] what is the current libchk status in LSB 4.0 and 4.1?

Denis Silakov dsilakov at gmail.com
Fri Apr 26 12:09:07 UTC 2013


On 04/26/2013 03:58 PM, Karel Srot wrote:
> Also, I do not fully understand exactly the analysis performed by
> libchk. Would it be possible to describe the process with manual steps
> e.g. using objdump or readelf? This would help me a lot with the
> debugging.
I'm afraid I can't explain it in terms of readelf or objdump, since I 
have never used these tools to analyze virtual tables (or maybe I hav, 
but forgot the details...).

However, the algorithm is well documented in sources.

The check of vtable entries starts here:

http://bzr.linuxfoundation.org/loggerhead/lsb/devel/misc-test/annotate/head:/libchk/classchk.c#L353

The core part of the test is to check that symbol names in virtual 
tables are as expected. If not, then it tries to analyze - if the 
modification breaks backward compatibility or not.

This analysis starts here:
http://bzr.linuxfoundation.org/loggerhead/lsb/devel/misc-test/annotate/head:/libchk/classchk.c#L463

(there are a lot of comments there, I think it's better to look the in 
the code then to copy-paste here...)

Note that the algorithm can really produce false positives. E.g., if for 
some vtable entry you replace one symbol with another which has exactly 
the same functionality. libchk will treat this as a failure, but in 
reality this is not true.

-- 
Regards,
Denis.



More information about the lsb-discuss mailing list