Closed realazthat closed 2 years ago
Oddly enough I can't reproduce this :( Can you supply a MWE?
And, in case it's important, compiler and version?
That said, this is indeed one of the cases flagged as a compiler warning:
../../boost/wave/util/cpp_macromap_predef.hpp:138:42: warning: ‘%04ld’ directive writing between 4 and 16 bytes into a region of size 6 [-Wformat-overflow=]
138 | sprintf(buffer, "0x%02d%1d%1d%04ld", BOOST_WAVE_VERSION_MAJOR,
| ^~~~~
../../boost/wave/util/cpp_macromap_predef.hpp:138:29: note: directive argument in the range [-106751991167300, 106751991167300]
138 | sprintf(buffer, "0x%02d%1d%1d%04ld", BOOST_WAVE_VERSION_MAJOR,
@realazthat if the above PR fixes your problem there is no need for a MWE. LMK.
@realazthat it seems like this was resolved for you so I'm closing the ticket.
Constructing a simple context to process simple source code, with sanitizers on, results in the following report:
I suspect there might be something wrong with the sprintf: https://github.com/boostorg/wave/blob/59610d6f79951fae841b9403fbdf5dfd63b45867/include/boost/wave/util/cpp_macromap_predef.hpp#L138