[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 0/2] fix memory leaks reported by GCC -fanalyzer
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Edwin Török <edvin.torok@xxxxxxxxxx>
- Date: Fri, 24 Feb 2023 13:36:44 +0000
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Edwin Török <edwin.torok@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
- Delivery-date: Fri, 24 Feb 2023 13:37:01 +0000
- Ironport-data: A9a23:qXFGeKnnYVUdPMvBgjz2wvbo5gyJJkRdPkR7XQ2eYbSJt1+Wr1Gzt xIdWWmCOf6LY2f9fN10PN7k9E0HsZ/UndVrSgVopC01EyMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7auaVA8w5ARkPqgR5gOGzRH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 fkeczU0dznavMfo+5ucZc9Kq/ghA/C+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsWYAx/5JEWxY9EglHyfyNZrhSJorAw4EDYzRBr0airO93QEjCPbZQFwh/E+ DOal4j/KggbP86w0DWnzlyh2qzGx3LKQ6ciNYTto5aGh3XMnzdOWXX6T2CTo/ajjVWlc8lCM EFS8S0rxYAt8GS7Q9+7WAe3yFaUsxhZV9dOHukS7ACW1rGS8wufHnIDTDNKdJohrsBeeNAx/ gbXxZWzX2Up6eDLDyvHrd94sA9eJwAQKzQHXDYtFDAgveLKh64VqD/zTPlaRfvdYsLOJRn8x DWDrS4bjroVjNIW26jTwW0rkw5AtbCSEFdru1y/snaNq1ogOdX7P9DABU3zt64oEWqPcrWWU JHoceC65ftGM5yCnTflrA4lTODwvKbt3NExbDdS83gdG9aFoSPLkWN4umsWyKJV3iEsKFfUj Lf741852XOqFCLCgVVLS4ywEd826qPrCM7oUPvZBvIXPMcuLVDYpn4zNB7Bt4wIrKTLuftiU ap3jO72VSpKYUiZ5GfeqxghPU8DmXllmDK7qWHTxBW7y7uODEN5up9cWGZimtsRtfveyC2Mq oY3Cid/40kHOAEISnWNoNF7wJFjBSRTOK0aXOQOLLbbfVA5RTBxYxITqJt4E7FYc21uvr+g1 hmAtoVwkTITWVWvxd22V01e
- Ironport-hdrordr: A9a23:RSlYHal907ntCY/7oo0jx1/d/pLpDfI93DAbv31ZSRFFG/Fw9v rCoB1/73SftN9/YgBCpTn+AtjjfZqxz/BICOoqUYtKPjOHhILAFugL0WKI+VLd8kPFl9K13J 0QFpRDNA==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Edwin Török <edwin.torok@xxxxxxxxx>
Using GCC 12.2.1 with -fanalyzer it has shown some memory leaks:
This is how I enabled -fanalyzer (adding it to CFLAGS for toplevel
configure didn't seem to work):
```
CFLAGS += $(call cc-option,$(CC),-fanalyzer)
```
Note that there are more errors shown than fixed here, but they seem to
be false positives (which is why this flag cannot, yet, be enabled by
default).
Edwin Török (2):
xc_core_arch_map_p2m_tree_rw: fix memory leak
backup_ptes: fix leak on realloc failure
tools/libs/guest/xg_core_x86.c | 2 ++
tools/libs/guest/xg_offline_page.c | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
--
2.39.1
|