model-writtenrun 8378 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Davis reported that GCC with FORTIFY_SOURCE generated slower memcpy code after logical-tape allocation changes, and proposed a flexible-array wrapper workaround in #1.
- Peter Geoghegan suggested an alignment explanation and cited precedent for compiler workarounds in #2, while Jeff explained that the copied buffer was separate from the tape array and questioned whether other situations might benefit from the generated code in #3.
- After Alvaro Herrera revived the stalled issue in #4, Jeff proposed committing the original workaround in #6; Tom Lane objected to its platform-specific justification and requested a GCC bug report and broader evidence in #7.
- Andres Freund found ordinary memcpy calls with GCC 10 and glibc 2.30 in #8; Jeff filed the compiler bug in #9 and identified affected Ubuntu compiler and libc versions in #10.
- While reducing the compiler test case, Jeff replaced the structural workaround with a one-line hardcoded trailer-size change in #11.
- Tom identified integer width as the likely mechanism and proposed retaining sizeof with an integer cast in #12; Jeff confirmed the workaround's immediate effect in #13, while noting that end-to-end testing remained outstanding.
- The thread ended with Andres reporting that several Debian GCC releases did not reproduce the compiler behavior, although a GCC snapshot did, in #14.
- Jeff subsequently committed 1fbb6c93df, restricting the integer cast to LogicalTapeWrite's payload-size comparison; neither the flexible-array wrapper nor the hardcoded trailer size landed.