Installed v5 toolchain ASAN can't compile passing a local array to a function

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible
    • ALL
    • Programmability 2025-03-03, Programmability 2025-03-17
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Compiling the following file with the installed v5 toolchain's clang (or clang++) segfaults:

      void f(char *buf) { }
      
      int main() {
          char _buf[8];
          f(_buf);
          return 0;
      }
      

      Compile with /opt/mongodbtoolchain/v5/bin/clang -fsanitize=address minimal.c and you'll observe the crash. Any other clang or clang++ seems to work, including the functionally similar v5 bazel toolchain clang. This happens on all revisions of the v5 toolchain.

              Assignee:
              Ryan Berryhill
              Reporter:
              Ryan Berryhill
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: