[Bug c++/52213] New: Add chunk of memory if array is size is divisable with 8

2012-02-12 Thread jovica.sabic at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52213

 Bug #: 52213
   Summary: Add chunk of memory if array is size is divisable with
8
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: jovica.sa...@gmail.com


When i create array of chars and before using I initialize char to some special
char value, like _. If char array size is divisible with 8, array became bigger
and filled with chunk of memory data. If you run attached sample code, you will
see. Interesting thing that is happened only with 8 divisors.



int main(){

for (int i = 1; i < 100; i++){
char* name = new char[i];
for (int j=0; j


[Bug c++/52213] Add chunk of memory if array is size is divisable with 8

2012-02-12 Thread jovica.sabic at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52213

--- Comment #2 from Jovica  2012-02-12 14:03:33 
UTC ---
I know this should be undefined behaviour but i drew attention to it only
happens when there is a length divided by 8. That's why I wrote this bug, to
pay attention to this.


[Bug c++/52213] Add chunk of memory if array is size is divisable with 8

2012-02-12 Thread jovica.sabic at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52213

Jovica  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #4 from Jovica  2012-02-12 14:22:49 
UTC ---
Not a bug.