antamel opened a new pull request, #1266: URL: https://github.com/apache/age/pull/1266
Hello! In the build with address and undefined behavior sanitizers, my colleague Andrew Bille <[email protected]> found several errors in the current master branch. The build was made with options like that: ``` CC=gcc-11 CXX=g++-11 CPPFLAGS="-ggdb -O0 -g3 -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=all -fno-sanitize=nonnull-attribute -fstack-protector" LDFLAGS='-fsanitize=address -fsanitize=undefined -static-libasan -static-libubsan' ASAN_OPTIONS=detect_leaks=0:abort_on_error=1:halt_on_error=1:disable_coredump=0:strict_string_checks=1:check_initialization_order=1:strict_init_order=1:detect_odr_violation=0 ``` There are several "load of misaligned address" sanitizer errors in the log during installcheck tests with PG at REL_15_STABLE (6db384f2f9). See [master-at-a04fd69b.zip](https://github.com/apache/age/files/12856017/master-at-a04fd69b.zip) attached. (Other errors are masked by this, about them below.) Some of these errors are not related to age, is a bug of the sanitizer itself (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111382). The other ones i tried to fix with the [Fix sanitizer aligment errors with memcpy.](https://github.com/apache/age/commit/de3633d21e6b879176b3e57ffc377db9aa3edc3f) commit. After that "misaligned" errors disappeared and other errors became visible. Please see postmaster.log in the [after-first-fix-at-de3633d2.zip](https://github.com/apache/age/files/12856019/after-first-fix-at-de3633d2.zip). The second commit [Fix sanitizer "invalid values for type '_Bool' " errors with palloc0.](https://github.com/apache/age/commit/3afbad612251b3e95db1ea0b8daac9344754c2c3) fixes runtime errors: "load of value xxx, which is not a valid value for type '_Bool'" while the third [Fix sanitizer heap-buffer-overflow errors during csv files parsing.](https://github.com/apache/age/commit/2840ce1fdbd2027a9a83ffa06334c703fc7e6e24) one fixes "heap-buffer-overflow on address.." one during csv file parsing. On applying the first three patches, another error heap-buffer-overflow became visible. See log in [before-last-fix-at-2840ce1f.zip](https://github.com/apache/age/files/12856022/before-last-fix-at-2840ce1f.zip). The last commit [Save the metadata representing by the extensible node with the null t…](https://github.com/apache/age/commit/71f445a61d604f4ca8a2bc5f364f4c0077e09ac5) fixes it add all tests began to pass without errors with REL_15_STABLE and REL_14_STABLE branches. Would be happy for any comments and concerns. With kind regards, -- Anton A. Melnikov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
