From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 221523858C74; Mon, 27 Mar 2023 19:37:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 221523858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679945848; bh=bZaUfEoQVp/cS3fIDcb2mC/MGbMqSs3J/gpuUrPHNHQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rniBMDvm2xobuOVq6l8wVBh3FTHaJIYUXjS6Jo3jAwHAudCVEAYMkxer9d74eFzm4 fgjEiC2HWNeI9EbM/GbwyBGlO57qECa6gL+T1yxwpYrfUGweVvvsAb/OCL1zclbNGg lF+Lr4wwzcifRlEnTGUxWY5v/MID8l1C8CtPMV4M= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/109306] The strstr implementation in libiberty might have undefined behavior (out of bounds mem access) Date: Mon, 27 Mar 2023 19:37:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 13.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=3D109306 --- Comment #3 from Andrew Pinski --- (In reply to pmorf from comment #2) > Oh. Is there a different implementation I'll link against when telling gcc > to use the c++11 standard ? I am saying that implementation is only used if the host's libc does not ha= ve strstr for compiling/linking GCC itself; it is not used otherwise. Otherwise the strstr implementation is in glibc on Linux or Apple's libc on= Mac OS X or musl on some Linux distro. Or in Microsoft's libc on Windows.=