From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A4E93385041C; Wed, 9 Sep 2020 21:44:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4E93385041C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1599687849; bh=T0u2t9R3vVddKkgtwtlMXgTpzjgdc+wMJz0f1lhCvwA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sCBjXU9lYpuO8gWaR+fzpovnw6PkW5vpPZr8dYOmv4ZE3HKUxwPu9D0CppyrYWnoG 0P2d6uAS5vlQKwMrGpKW4/o6mxbatDJTzfT3x+YIf7VhEIf2QrJC9EsLXPDOF1gI8o aPh3v8r+xbGruaTTSWWxqAC8Z3gkV92P7s374f04= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/94355] support for C++ new expression Date: Wed, 09 Sep 2020 21:44:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2020 21:44:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94355 David Malcolm changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Last reconfirmed| |2020-09-09 --- Comment #3 from David Malcolm --- The above patch is an initial implementation of new/delete support; it works for the simplest cases. As noted in the commit message this patch was mostly about generalizing the sm-malloc.cc code; the implementation of new/delete will no doubt need much further refinement (and beyond that, the analyzer doesn't yet know about vfuncs, exceptions, inheritance, RTTI, etc) Specific things still to be investigated relating to new/delete (if only to= add test coverage): * all of the various cases seen at https://en.cppreference.com/w/cpp/memory/new/operator_new * placement new * global and class-specific replacements for operator new/new[] * exceptions vs non-throwing allocators vs -fno-exceptions * verify that ctors/dtors are simulated appropriately for both scalar and vector new/delete Anything else? Note to self: see also https://en.cppreference.com/w/cpp/language/new=