Community in read only mode June 18 & 19
This community will be set in READ ONLY mode for a while on Tuesday June 18 into Wednesday June 19 while we import content and users from our Micro Focus Forums community site. MORE INFORMATION
Highlighted
Henry3 Absent Member.
Absent Member.
5040 views

BoundsChecker reports allocation conflict for new(nothrow) [] / delete []

BoundsChecker is reporting an allocation conflict on the below code.

Allocation Conflict: Attempting to call global_operator_delete_array on 0x02F86B10; pointer was allocated by global_operator_new.

int _tmain(int argc, _TCHAR* argv[])

{

char * temp = new (std::nothrow) char[9];

delete [] temp;

return 0;

}

 

If this is converted to use the non-array delete operator the conflict is resolved. I would expect the array delete should be used with the array new regardless of the throw mode. 

0 Likes
5 Replies
Rick Papo Absent Member.
Absent Member.

RE: BoundsChecker reports allocation conflict for new(nothrow) [] / delete []

Are you the same guy who asked this question last week?  The problem has been found, and I am in the process of verifying the fix.

0 Likes
Henry3 Absent Member.
Absent Member.

RE: BoundsChecker reports allocation conflict for new(nothrow) [] / delete []

Nope wasn't me; great news about the fix though.

0 Likes
Rick Papo Absent Member.
Absent Member.

RE: BoundsChecker reports allocation conflict for new(nothrow) [] / delete []

Please download the latest version from one of these two sites:

 ftp.microfocus.com/.../DPVC.10.6.472.1.exe

 ftp.microfocus.com/.../DPS.10.6.472.1.exe

The DPS version is the full Devpartner Studio, the DPVC is the BoundsChecker-only version.  Download only the one you are already license for, since their licenses are distinct.

This should resolve this particular problem, which has been broken for nearly three years.  Strange that in one week we get two nearly identical requests for the exact same problem, after three years with nobody complaining at all.

0 Likes
Rick Papo Absent Member.
Absent Member.

RE: BoundsChecker reports allocation conflict for new(nothrow) [] / delete []

Ouch.  The fix still needs more work for X64 applications.  Works fine for X86, though.  Betcha the problem is the function name mangling...

0 Likes
Rick Papo Absent Member.
Absent Member.

RE: BoundsChecker reports allocation conflict for new(nothrow) [] / delete []

And I have the fix for X64 applications too.  The next full kit build we (successfuly) make will have this fix in it.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.