Skip to content

SIGILL with new libc qsort_r implementation in BranchFolder::MergePotentialsElt #71312

Closed
llvm/llvm-project-release-prs
#771
@crrodriguez

Description

@crrodriguez

llvm_unreachable("Predecessor appears twice");

Now glibc compares an object with itself, just like when _GLIBCXX_DEBUG is enabled therefore explicit unreachable triggers. this breaks at least any rustc compiler available.

#0  0x000015129e40516a in int llvm::array_pod_sort_comparator<llvm::BranchFolder::MergePotentialsElt>(void const*, void const*) () from /home/crrodriguez/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/[libLLVM-17-rust-1.75.0-nightly.so](http://libllvm-17-rust-1.75.0-nightly.so/)

#1  0x00001512a0043779 in __GI___qsort_r (pbase=0x15128c90bd80, total_elems=<optimized out>, size=0x10, cmp=<optimized out>, arg=<optimized out>) at qsort.c:335

#2  0x000015129e4df6e6 in llvm::BranchFolder::TryTailMergeBlocks(llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, unsigned int) () from /home/crrodriguez/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/[libLLVM-17-rust-1.75.0-nightly.so](http://libllvm-17-rust-1.75.0-nightly.so/)

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions