https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94244
Bug ID: 94244 Summary: std::sort corrupts memory Product: gcc Version: 4.8.5 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: markd at kermodei dot com Target Milestone: --- Created attachment 48076 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48076&action=edit program source, *.ii, *.s, and makefile The attach program results in std::sort corrupting memory and SIGSEGVing. I have had this happen with another program and was never able to find a solution. This does not fail on all platforms, however, it happens consistently on RedHat version I have access to: Fails with: - g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) - g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Works with: - g++ (MacPorts gcc7 7.5.0_1) 7.5.0 - g++-mp-8 (MacPorts gcc8 8.3.0_5) 8.3.0 - Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0