[pkg-boost-devel] Bug#865096: libboost-dev: Undefined behavior in boost::format("%d") % 1
Olaf van der Spek
olafvdspek at gmail.com
Mon Jun 19 09:54:20 UTC 2017
Package: libboost-dev
Version: 1.62.0.1
Severity: normal
Dear Maintainer,
$ g++ a.cpp -fsanitize=undefined && ./a.out
/usr/include/boost/format/alt_sstream.hpp:146:60: runtime error: member call on address 0x7fffdb4f36a0 which does not point to an object of type 'basic_oaltstringstream'
0x7fffdb4f36a0: note: object has invalid vptr
00 00 00 00 00 00 00 00 00 00 00 00 18 3a 4f db ff 7f 00 00 b0 4c 37 fa 66 55 00 00 28 5b 0d 80
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
a.cpp:
#include <iostream>
int main()
{
std::cout << boost::format("%d") % 1 << std::endl;
// std::cout << boost::format("%04d-%02d-%02d") % (date->tm_year + 1900) % (date->tm_mon + 1) % date->tm_mday << std::endl;
return 0;
}
-- System Information:
Debian Release: 9.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libboost-dev depends on:
ii libboost1.62-dev 1.62.0+dfsg-4
libboost-dev recommends no packages.
Versions of packages libboost-dev suggests:
pn libboost-doc <none>
-- no debconf information
More information about the pkg-boost-devel
mailing list