From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B9AD43858D28; Wed, 12 Apr 2023 08:52:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9AD43858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681289526; bh=SCpZJbQ/5rx1B28bbMYYi8CL0gxiQv6Awi/DaFFv3ZA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c4efT1PkJFwZzWfPtiGYnSqgviSCZEzRiMBb0s30H1riXbxP3+BFq2BBPdKBZCzwT s0bTydRiE78COggoOrchrDV2JjCG3hx4hY1Mi5jqmwAwTW6EDnWOBmOmSw6YlRo9Fo R83/y8ASZX+rI8Jf2ebHZ41k8g0lad+axYEqeMuY= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/109446] Possible destination array overflow without diagnosis in memcpy Date: Wed, 12 Apr 2023 08:52:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 8.4.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D109446 --- Comment #7 from Jakub Jelinek --- (In reply to Richard Biener from comment #6) > not sure if we should prevent all of those transforms. But the question = is > why ASAN doesn't instrument the generated aggregate copy? Maybe because > in C/C++ you cannot write an aggregate array copy? We do instrument those. But only instrument them by checking the first and last byte of the copy, not all bytes in between (because that would be for inline checking too large - we'd need to emit inline a loop over those bytes).=