From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EA70C3858D20; Thu, 10 Nov 2022 22:48:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA70C3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668120503; bh=pCdIFnPwOd4FvVuCaG5CXtk4YzeSpt244VhSpacIH6g=; h=From:To:Subject:Date:From; b=fQKzOZmP1CpLlfZsKjH0IWklRab2ujZd7svQjFiWyOZempw5zEze2Tk9s79SXx9Cw 0TLxt9DL4jiS5HtcBT/R0pa09HS9qWZ8lYgo03H8UnzThbPk3aj6sSqBj0qFEeLvEh Kjh1ddkt2ft/zX/puRb7oSompvQImC9/Q4xGt7q0= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107625] New: RFE: analyzer support for dlopen etc Date: Thu, 10 Nov 2022 22:48:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107625 Bug ID: 107625 Summary: RFE: analyzer support for dlopen etc Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- Perhaps the analyzer could support: * dlopen * dlclose * dlsym Notes: see: https://man7.org/linux/man-pages/man3/dlopen.3.html (covers dlclose also) https://man7.org/linux/man-pages/man3/dlsym.3.html Potentially we could track: - dlopen succeeding vs dlopen failing - dlsym after dlclose - double-'dlclose' - pointers returned from dlsym becoming invalid after dlclose (e.g. attempting to call a function after a 'dlclose') (potentially create a region for the "dlopen", putting code/data within= it, so that we can track the memory regions that become invalid after dlclose) Would be great to be able to do some kind of type-checking on the result of "dlsym", but I'm not sure how we could reliably get at the actual type of t= he symbol.=