Bug#988986: cppcheck: Symbol `_ZTVN8tinyxml210XMLPrinterE' has different size in shared object, consider re-linking

2021-05-22 Thread Christian Göttsche
Package: cppcheck
Version: 2.3-1
Severity: important

Dear Maintainer,

running cppcheck prints the following message:

Symbol `_ZTVN8tinyxml210XMLPrinterE' has different size in shared
object, consider re-linking

Also reproducible with cppcheck version 2.4 from experimental.


-- System Information:
Debian Release: 11.0
 APT prefers unstable
 APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-7-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cppcheck depends on:
ii  libc6 2.31-12
ii  libgcc-s1 11.1.0-2
ii  libpcre3  2:8.39-13
ii  libstdc++611.1.0-2
ii  libtinyxml2-8 8.1.0+dfsg-1
ii  libz3-4   4.8.10-1
ii  python3   3.9.2-3
ii  python3-pygments  2.7.1+dfsg-2

cppcheck recommends no packages.

Versions of packages cppcheck suggests:
pn  clang 
pn  clang-tidy
pn  cppcheck-gui  

-- no debconf information



Bug#988986: cppcheck: Symbol `_ZTVN8tinyxml210XMLPrinterE' has different size in shared object, consider re-linking

2021-05-22 Thread Joachim Reichel

reassign 988986 tinyxml2
severity 988986 serious
retitle 988986 ABI change in tinyxml2 8.1.0+dfsg-1
found 988986 8.1.0+dfsg-1
thanks


Hi Chow,

it seems that there's an ABI change in tinyxml2 8.1.0+dfsg-1.

cppcheck 2.3-1 was uploaded to unstable on 2020-12-17, compiled against tinyxml2 8.0.0+dfsg-2, and 
migrated to testing. On 2021-05-20, tinyxml2 8.1.0+dfsg-1 was uploaded to unstable.


Running "touch foo.cpp; cppcheck foo.cpp" works as expected in testing, but shows "_cppcheck: Symbol 
`_ZTVN8tinyxml210XMLPrinterE' has different size in shared object, consider re-linking" in unstable.


$ echo _ZTVN8tinyxml210XMLPrinterE | c++filt
vtable for tinyxml2::XMLPrinter

Indeed, the diff both between versions of tinyxml shows that the vtable of XMLPrinter has been 
extended. Looks to me as this ABI change requires at least a library transition.


Thinking a bit more about it ...

This also changes the vtable of derived class (XMLPrinter is not final) in an incompatible way , 
which can be seen with the example in the contrib folder. Building against 8.0.0+dfsg-2 and running 
with 8.1.0+dfsg-1 leads to a crash. I wonder why upstream did not bump the SOVERSION.


Best regards,
  Joachim