model-writtenrun 8076 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported repeated aggregate-creation assertion failures on buildfarm member hornet after changes to list-access macros, suspecting an incorrect direct-argument count #1.
- Noah Misch found that disabling optimization suppressed the failure and, following Tom Lane's request, isolated the problem to the parser build, particularly gram.o; disabling optimization remained a possible workaround #2 #3 #4.
- Tom Lane suspected that makeOrderedSetArgs() was fetching the direct-argument count after list_concat() modified the list; David Rowley requested assembly comparisons, which Noah Misch supplied #5 #6 #7.
- The assembly supported Tom Lane's reordering diagnosis, so he posted a patch that constructs the integer Value before concatenating the lists, preferring a code change that could also protect against similar behavior from other compilers #8.
- Noah Misch confirmed that the patch made hornet's optimized build pass make check; while Tom Lane questioned whether C sequencing rules might permit the original reordering, Noah explained that the separate full expressions prohibit it #9 #10 #11 #12.
- The thread ended with the tested patch unchanged and the compiler-semantics explanation supplied; shortly afterward, Tom Lane committed the patch exactly as posted and backpatched the fix to all supported versions #8 #12 8d2a01ae12.