From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD090385842C; Tue, 3 Oct 2023 21:37:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD090385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696369043; bh=WceMlqCvrYo8DK23fAPNFm98u9xgM81KCNKl4HlCUOs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rMPXuJK06Dwes+SvvLzJRmk8jn09qQk+Fh9fsVWIb3VBet8H7r+zXj0Yzpa3dfHXY Ca+ev9HuFKla59+/9fEDixItRePCzH46jZgMNqrzy5ITZ28kEZ+U/q6C8i13K6Krej 2fmdgWEeadjgvj2TOoFpMEPOZNe7wPyhGtVz+T1M= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111685] Segfault while sorting on array element address Date: Tue, 03 Oct 2023 21:37:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111685 --- Comment #6 from Andrew Pinski --- https://github.com/gcc-mirror/gcc/blob/d9375e490072d1aae73a93949aa158fcd2a2= 7018/libstdc%2B%2B-v3/include/bits/stl_algo.h#L1814 is exactly where a temp copy is created. Is that valid for std::sort, I am pretty sure it is.=