MDEV-39712: gcc 16 error with error=parentheses on mysql/service_encr…#5110
MDEV-39712: gcc 16 error with error=parentheses on mysql/service_encr…#5110grooverdan wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the ABI check documentation and logic, removes a side-effect assertion from several plugin headers, and integrates Valgrind memory instrumentation into the encryption service. The review feedback identifies portability issues with the use of the __has_include preprocessor operator and GNU-specific sed extensions, and suggests maintaining consistent C-style comments in public headers.
| #if __has_include(<my_valgrind.h>) | ||
| #include <my_valgrind.h> | ||
| #endif |
There was a problem hiding this comment.
The __has_include preprocessor operator is not available in all compilers (it was introduced in GCC 5). Using it directly will cause a compilation error on older compilers that MariaDB still supports. It should be guarded with #ifdef __has_include to ensure portability.
| #if __has_include(<my_valgrind.h>) | |
| #include <my_valgrind.h> | |
| #endif | |
| #ifdef __has_include | |
| #if __has_include(<my_valgrind.h>) | |
| #include <my_valgrind.h> | |
| #endif | |
| #endif |
| EXECUTE_PROCESS( | ||
| COMMAND sed -e "/^# /d" | ||
| -e "/^[ ]*$/d" | ||
| -e "/^[ \t;]*$/d" |
There was a problem hiding this comment.
| MEM_CHECK_ADDRESSABLE(dst, *dlen); | ||
| MEM_CHECK_ADDRESSABLE(key, klen); | ||
| MEM_CHECK_ADDRESSABLE(iv, ivlen); | ||
| // Verify buffers do not overlap |
…yption.h The assertion on assignment failed on gcc16. The assertion added in MDEV-30389 seems intent on testing boundaries. Re-use the my_valgrind.h header to approve a bunch of assertions around the contents of the output buffer, and the addressibility of the pointer and lengths passed to the encryption function.
…yption.h
The assertion on assignment failed on gcc16.
The assertion added in MDEV-30389 seems intent on testing boundaries.
Re-use the my_valgrind.h header to approve a bunch of assertions around the contents of the output buffer, and the addressibility of the pointer and lengths passed to the encryption function.
note:
very much a test at the moment. Using my_valgrind.h as a header may by appropriate on headers. Having the boundary testing is useful however. The __has_include may not be as portable as desirable.
this is very much a test