Fix PPC clang backend crash compiling PALite

XMLWordPrintableJSON

      The rhel8-ppc `format-wtperf-test` Evergreen task fails during the WiredTiger compile step because clang crashes while compiling `ext/page_log/palite/palite.cpp`.

      Task:
      https://spruce.corp.mongodb.com/task/wiredtiger_rhel8_ppc_format_wtperf_test_30488b8bba04ce659fee3afce48454bf85294580_26_06_15_10_05_05/logs?execution=1

      Observed on both executions:

      • execution 0 failed in `compile wiredtiger`
      • execution 1 failed after restart in the same command

      Failure summary:

      FAILED: ext/page_log/palite/CMakeFiles/wiredtiger_palite.dir/palite.cpp.o
      /opt/mongodbtoolchain/v5/bin/clang++ ... -Og -std=c++20 ... ext/page_log/palite/palite.cpp
      fatal error: error in backend: Do not know how to expand this operator's operand!
      clang++: error: clang frontend command failed with exit code 70
      MongoDB clang version 22.1.0
      Target: ppc64le-mongodb-linux
      Running pass 'PowerPC DAG->DAG Pattern Instruction Selection'
      on function '@_ZNKSt8__format14__formatter_fpIcE6formatIgNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS7_'
      

      Clang reported repro files on the failing hosts:

      execution 0: /data/mci/a3b44c1b19f55441af5eed50bcc957bb/tmp/palite-3e2c62.cpp
      execution 0: /data/mci/a3b44c1b19f55441af5eed50bcc957bb/tmp/palite-3e2c62.sh
      execution 1: /data/mci/7e8bec0b63042254179b27ca50d8a898/tmp/palite-7dc7b9.cpp
      execution 1: /data/mci/7e8bec0b63042254179b27ca50d8a898/tmp/palite-7dc7b9.sh
      

      The patch under test only changes `src/cursor/cur_layered.c`, so this appears to be a PPC clang backend/toolchain issue triggered by the existing PALite C++20/std::format code path rather than a failure in the format/wtperf workload itself.

      Expected result:
      The rhel8-ppc build should compile PALite successfully, or PALite should avoid the code pattern that triggers the PPC clang backend ICE.

            Assignee:
            Salman Javed
            Reporter:
            Shoufu Du
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: