Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-49522

clang 17 miscompiles zlib-ng code

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-8.10.z
    • rhel-8.10.z
    • clang
    • None
    • llvm-17.0.6-3.module+el8.10.0+22125+1509a634
    • None
    • None
    • 2
    • sst_pt_llvm_rust_go
    • ssg_platform_tools
    • 2
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • Sprint 7, SST LLVM/Rust/Go Sprint 8
    • Unspecified Release Note Type - Unknown
    • None

      What were you trying to do that didn't work?

      I am trying to compile .NET on s390x on RHEL 8.10. It compiles successfully but a bunch of unit tests crash when executed. Someone tracked it down to clang 17 miscompiling the bundled zlib-ng in .NET. They also tracked down the fix to a one-line change: https://reviews.llvm.org/D156972

       

      $ git log --grep 'Fix crash in replaceStoreOfInsertLoad'
      commit 98ccc70b93a39a7ea3e26f7f5b5fe40d39b5a7e5
      Author: pvanhout <pierre.vanhoutryve@amd.com>
      Date:   Thu Aug 3 10:53:08 2023 +0200
          [DAG] Fix crash in replaceStoreOfInsertLoad
          Idx's type can be different from Ptr's, causing a "Binary operator types must match" assertion failure when emitting the MUL.
          Reviewed By: arsenm
          Differential Revision: https://reviews.llvm.org/D156972
      

       

      Please provide the package NVR for which bug is seen:

      clang-17.0.6-1.module+el8.10.0+20808+e12784c0.s390x

      How reproducible:

      100% of the time

      Steps to reproduce

      1. Build .NET on s390x, then run its unit tests

      Expected results

      Tests pass

      Actual results

      Compression related tests cause .NET to crash

        1. rhel-49522-s390x.tar.gz
          40 kB
          Jesus Checa Hidalgo
        2. rpminspect-logs.tar.gz
          141 kB
          Jesus Checa Hidalgo

            tstellar@redhat.com Thomas Stellard
            rhn-engineering-omajid Omair Majid
            Thomas Stellard Thomas Stellard
            Jesus Checa Hidalgo Jesus Checa Hidalgo
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: