Repository navigation
GCC15 compatibility issues - #513
Conversation
GCC 15's C++ standard library headers (bits/chrono.h) use _CR as an internal template parameter name. The _CR and _LF macros defined in tools/solar.h conflict with these internal identifiers, causing compilation failures in headers that include both solar.h and C++ standard headers. Rename _CR->_LF to SAL_CR->SAL_LF across the codebase to avoid conflicts with reserved identifiers in the C++ standard library.
GCC 15+ treats empty parameter lists () as 'no parameters' (C99+ semantics) rather than 'unspecified parameters' (C89 semantics), causing compile failures when calling these functions with arguments. Fix all K&R-style function declarations across build tools (soltools, l10ntools, rsc) by providing explicit parameter types.
1. Fix buffer overflow in SvMemoryStream::PutData: add bounds check before memcpy to prevent overflow when buffer reallocation fails. 2. Change RTLD_NOW to RTLD_LAZY in checkdll: GCC 15 with _FORTIFY_SOURCE=2 detects issues with eager symbol resolution in shared libraries with many undefined symbols. Source-only fixes; no Makefile changes.
|
The edits look good to me, but I don't see the necessity of the additional check against the buffer overflow...? The above However, if you change anything in method |
|
Speaking of |
|
Hmm ... comments are not part of the fix, they should go on another commit. The RTLD_LAZY change is because FORTIFY_SOURCE does a bunch of symbol replacements as part of it's operation. I just needed to get those changes to build fast on WSL/Ubuntu, but we could probably do without that. About the sanitizers: that is very useful for debug builds, and ideally with fuzzing, but not for production. And I am currently busy with the regular bugs :). |
|
oops.. should have deleted that extra check... will do in another commit :(. |
While working on another feature, I found these issues on
gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0
There is a buffer overflow with FORTIFY_SOURCE which I worked around, no idea if you want to try something else.