Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
gopi90 Absent Member.
Absent Member.
1756 views

bound checker issue Allocation Conflict: Attempting to call global_operator_delete_array on [address here] pointer was allocated by global_operator_new.

 I am getting below conflict error while running with VS 2008. why am i getting this error . There is no issue with the code. Am i missing something important here?

 

 

 

The below link looks like mentions similar issue. but i m not able to download the exe mentioned in the thread.

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

RE: bound checker issue Allocation Conflict: Attempting to call global_operator_delete_array on [address here] pointer was allocated by global_operator_new.

I don't really have enough information here, but I can tell you that the most common reason for this particular kind of problem is compiler optimizations. Since in the Microsoft compilers, the operator new array reduces down to operator new, and then to malloc, and the operator delete array reduces to operator delete, and then to free, if we fail to detect one of more of the steps in that reduction because of the optimizations resulting from inlining, then we get fussy and complain.

Now there is a complication in Visual Studio from 2008 onwards regarding non-primitive data classes: the compiler will actually generate code (code not from the user, nor from the C++ runtime libraries) to handle the construction and destruction of the elements in such array allocations and deletions. Again, this code is generated silently, and can cause some grief if we don't detect its presence.

Would you mind sharing a test case?
0 Likes
gopi90 Absent Member.
Absent Member.

RE: bound checker issue Allocation Conflict: Attempting to call global_operator_delete_array on [address here] pointer was allocated by global_operator_new.

0 Likes
gopi90 Absent Member.
Absent Member.

RE: bound checker issue Allocation Conflict: Attempting to call global_operator_delete_array on [address here] pointer was allocated by global_operator_new.

Hi Rick,

Thank you for the reply. Attached screen shot shows few of the examples of string modifications. In this case also i see the application conflict error by Boundschecker.

0 Likes
Rick Papo Absent Member.
Absent Member.

RE: bound checker issue Allocation Conflict: Attempting to call global_operator_delete_array on [address here] pointer was allocated by global_operator_new.

Where are you getting sstring from?
0 Likes
gopi90 Absent Member.
Absent Member.

RE: bound checker issue Allocation Conflict: Attempting to call global_operator_delete_array on [address here] pointer was allocated by global_operator_new.

Hi Rick,
sstring has been derived from std::string.
0 Likes
Rick Papo Absent Member.
Absent Member.

RE: bound checker issue Allocation Conflict: Attempting to call global_operator_delete_array on [address here] pointer was allocated by global_operator_new.

Do you have that class as a header file? Simply substituting std::string in a similar piece of code gives nothing odd at all.

int main ( ) {
std::string Test ( "This is a ");
std::string Word ( "sentence ");
std::string Clause ( "additional clause.");
Test += Word ;
Test += "with an ";
Test += Clause ;
return 0;
}
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.