Bug 2084608

Summary: Fix mismatched allocation function
Product: Red Hat Enterprise Linux 9 Reporter: Kostiantyn Kostiuk <kkostiuk>
Component: mingw-qemu-ga-winAssignee: Kostiantyn Kostiuk <kkostiuk>
Status: CLOSED ERRATA QA Contact: dehanmeng <demeng>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: mdean, qizhu, yvugenfi
Target Milestone: rcKeywords: TestOnly, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mingw-qemu-ga-win-104.0.2-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:22:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kostiantyn Kostiuk 2022-05-12 13:59:44 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. compile qemu-ga-win with VSS via GCC version >= 12.0


Actual results:

2022-05-10 13:25:26.133994 | cloud-host | DEBUG: ../qga/vss-win32/requester.cpp: In function 'void requester_freeze(int*, void*, ErrorSet*)':
2022-05-10 13:25:26.134099 | cloud-host | DEBUG: ../qga/vss-win32/requester.cpp:357:24: warning: 'void operator delete(void*)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
2022-05-10 13:25:26.134190 | cloud-host | DEBUG:   357 |                 delete volume_name_wchar;
2022-05-10 13:25:26.134270 | cloud-host | DEBUG:       |                        ^~~~~~~~~~~~~~~~~
2022-05-10 13:25:26.134353 | cloud-host | DEBUG: ../qga/vss-win32/requester.cpp:348:48: note: returned from 'void* operator new [](long long unsigned int)'
2022-05-10 13:25:26.134443 | cloud-host | DEBUG:   348 |             volume_name_wchar = new wchar_t[len];
2022-05-10 13:25:26.134523 | cloud-host | DEBUG:       |                                                ^
2022-05-10 13:25:26.134604 | cloud-host | DEBUG: ../qga/vss-win32/requester.cpp:362:20: warning: 'void operator delete(void*)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
2022-05-10 13:25:26.134686 | cloud-host | DEBUG:   362 |             delete volume_name_wchar;
2022-05-10 13:25:26.134765 | cloud-host | DEBUG:       |                    ^~~~~~~~~~~~~~~~~
2022-05-10 13:25:26.134871 | cloud-host | DEBUG: ../qga/vss-win32/requester.cpp:348:48: note: returned from 'void* operator new [](long long unsigned int)'
2022-05-10 13:25:26.134967 | cloud-host | DEBUG:   348 |             volume_name_wchar = new wchar_t[len];
2022-05-10 13:25:26.135049 | cloud-host | DEBUG:       |                                                ^



Expected results:

No mismatched allocation function warnings


Additional info:

Comment 2 dehanmeng 2022-05-19 13:12:43 UTC
After function test with the latest qga version mingw-qemu-ga-win-104.0.2-1.el9, although, there is only one minor problem with low priority https://bugzilla.redhat.com/show_bug.cgi?id=2087678, no other further urgent/high bug. so move this bug to VERIFIED.

Comment 5 errata-xmlrpc 2022-11-15 10:22:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (mingw-qemu-ga-win bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8107