[llvm-bugs] [Bug 47903] New: Possible bug in std::sort
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 19 08:55:36 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47903
Bug ID: 47903
Summary: Possible bug in std::sort
Product: libc++
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: alexandru.croitor at qt.io
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Created attachment 24076
--> https://bugs.llvm.org/attachment.cgi?id=24076&action=edit
std::sort crash repro
Hi, I may? have found a bug in libc++'s std::sort() that causes a craash.
I didn't dig too deep except for creating a minimal repro.
Stumbled upon this as part of a bigger project (Qt Creator), but reduced it to
the code in the attachment.
Reproduced it on macOS 10.15.7 + Xcode 11.6 Build version 11E708
As well as Ubuntu 18.04 clang 10.0.0 (unpackaged from releases.llvm.org) + a
self-built libc++ from git master ( 86ef379800162e5d6bb0d478c5bfb4b56498a272 )
building with the following script
$ cat make.sh
#!/bin/sh -x
export PREFIX=/home/alex/Dev/llvm-project/build/installed
export CLANG_PREFIX=/home/alex/Dev/clang10/bin
export CFLAGS="-nostdinc++ -I$PREFIX/include/c++/v1"
export LFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib -nostdlib++ -lc++"
$CLANG_PREFIX/clang++ -c -pipe $CFLAGS -O2 -std=gnu++11 -Wall -Wextra -o
main.o ../main.cpp
$CLANG_PREFIX/clang++ -ccc-gcc-name g++ $LFLAGS -o proj main.o -v
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201019/7cb9fe8b/attachment-0001.html>
More information about the llvm-bugs
mailing list