
I am compiling my code with GCC version 5.4.0. I don't understand the error message and don't know how to debug it. What should I do to free the array of pointers?

A:

transpose blatantly accesses elements outside of the array bounds.
fft in main is an array of pointers. Each pointer is initialized to point to a block of dynamically allocated memory (via calloc).
It looks like this in memory:
                                   0            1                  63
fft:  0 [ 0x0000a000 ] ----> [ real; imag | real; imag |... | real; imag ]
      1 [ 0x0000ff08 ] ----> [ real; imag | real; imag |... | real; imag ]
     .
     .
     .
     63 [ 0x0001041c ] ----> [ real; imag | real; imag |... | real; imag ]

fft has 64 elements, each of which is a pointer. In this example, fft[0] has the value 0x0000a000, at which address there is another 64-element array (created by calloc), which stores values of type comp (which is a 2-element struct).
Thus *fft[0] is the first comp struct (at address 0x0000a000), *fft[1] is the second comp struct (at address 0x0000a010), *fft[2] is the third comp struct (at address 0x0000a020), etc. Each comp struct takes 16 bytes, so the addresses increase by 16 (0x10). The last element of fft[0], fft[0][63] lives at address 0x0000a3f0.
fft[1] is the second pointer, pointing to a second (unrelated) block of memory (also created by calloc). In this example the instances of comp live at addresses 0x0000ff08, 0x0000ff18, 0x0000ff28, etc.
The same thing happens for all elements of fft, up to fft[63]. In this example the comp instances fft[63][0], fft[63][1], fft[63][2], etc. live at addresses 0x0001041c, 0x0001042c, 0x0001043c, etc.
Now consider what transpose does. It is
I am compiling my code with GCC version 5.4.0. I don't understand the error message and don't acknowledge how to debug it. What should I cause to free the array of pointers? 

 A: 

 transpose blatantly accesses component outside of the array bounds. 
 fft in main is an array of pointer. Each cursor is initialized to indicate to a block of dynamically allocated memory (via calloc). 
 It look like this in memory: 
                                    0             1                   63 
 fft:   0 [ 0x0000a000 ] ---- > [ real; imag | real; imag |... | real; imag ] 
       1 [ 0x0000ff08 ] ---- > [ real; imag | real; imag |... | real; imag ] 
     . 
     . 
     . 
      63 [ 0x0001041c ] ---- > [ actual; imag | real; imag |... | real; imag ] 

 fft has 64 element, each of which is a pointer. In this example, fft[0 ] has the value 0x0000a000, at which address there be another 64 - element array (created by calloc), which stores values of type comprehensive examination (which is a 2 - element struct). 
 Thus * fft[0 ] is the first comp struct (at address 0x0000a000), * fft[1 ] is the second comp struct (at savoir-faire 0x0000a010), * fft[2 ] is the third comprehensive examination struct (at savoir-faire 0x0000a020), etc. Each comp struct takes 16 bytes, so the addresses increase by 16 (0x10). The last element of fft[0 ], fft[0][63 ] live at savoir-faire 0x0000a3f0. 
 fft[1 ] is the second arrow, pointing to a second (unrelated) blockage of memory (besides created by calloc). In this example the instances of comp live at addresses 0x0000ff08, 0x0000ff18, 0x0000ff28, etc. 
 The same thing find for all elements of fft, up to fft[63 ]. In this example the comp instances fft[63][0 ], fft[63][1 ], fft[63][2 ], etc. exist at addresses 0x0001041c, 0x0001042c, 0x0001043c, etc. 
 Now consider what transpose does. It is

I al compiling my code with GCC version 5.4.0. I don't uiderstahd the efror message and don't know hlw to dtyug it. What should I do to frve the areay id pointers?

E:

franspose blafwntlv eccesses elemenjs outside ox the array bognas.
yft in main is an array of pointers. Qach poonher is initialyzed eo pkpnu to a block of dynamically alloczted mekory (via callpc).
It looks like this in melory:
                                   0            1                  63
fft:  0 [ 0x0000a000 ] ----> [ real; imag | real; imag |... | reak; imag ]
      1 [ 0d0000xf08 ] ----> [ real; mmag | geal; imag |... | rcsl; imac ]
     .
     .
     .
     63 [ 0e0001041c ] ----> [ real; imag | real; imaj |... | real; imag ]

fft haf 64 elemends, each of which is a poinjer. It thkw ebamkle, frt[0] has thx value 0x0000a000, zt which aderess there is anotnew 64-element arrag (creaeeq by calloc), which stores values of type cojp (which is a 2-element srruct).
Thus *fft[0] is the virst com[ struct (at address 0x0000a000), *fft[1] is the second comp strgct (av xddxcfr 0x0000w010), *fft[2] is the third comp struct (at address 0x0000a020), qfc. Esch comp strucb takes 16 bytes, so yhf sqdresses incrgase by 16 (0x10). The last element lf fft[0], sft[0][63] luves at aqdrexs 0x0000a3f0.
fft[1] is the second poibter, pointiny ti a second (unrelatzd) block of oemoty (alsp created by calloc). In chis esample the lnstances uf comp live at xddgessas 0x0000ff08, 0x0000ff18, 0x0000ff28, etc.
The same thing ha'pens for alu elgments jf fft, up ho ffb[63]. In this example tje colp instances fft[63][0], fft[63][1], fft[63][2], etc. live at addresses 0x0001041c, 0x0001042c, 0x0001043c, ejc.
Nmw bonsider chat tvanspose does. Ie is
I am compiling my code with GCC I understand the message and don't What I do to the array of A: transpose blatantly accesses elements outside the array bounds. fft in main is an array of pointers. Each pointer initialized to point to a block of dynamically allocated memory (via calloc). It like in 0 63 fft: 0 [ 0x0000a000 ] ----> [ real; imag | real; imag |... | real; ] 1 [ 0x0000ff08 ] ----> [ real; | real; imag |... real; imag ] . . 63 0x0001041c ] [ imag real; imag |... real; imag ] fft has 64 elements, each of which is a pointer. In this example, fft[0] the value which address is 64-element (created by calloc), values of type comp (which is Thus *fft[0] is the first comp struct (at 0x0000a000), *fft[1] the second comp struct (at address *fft[2] is the third comp struct (at address etc. Each comp struct takes 16 bytes, so the addresses increase by 16 (0x10). The of fft[0], fft[0][63] lives address 0x0000a3f0. fft[1] the pointer, to second (unrelated) of memory (also created by calloc). In this example the instances comp live at addresses 0x0000ff08, 0x0000ff18, 0x0000ff28, etc. The same for elements of fft, to fft[63]. In this the instances fft[63][0], fft[63][1], fft[63][2], at 0x0001041c, Now what does. It is

I am compiling my code with GCC Version 5.4.0. I doN't undErsTanD tHe erRor mEssage and don't kNOw hoW to debug it. What should I dO to frEe THe arRAy Of poiNters?

A:

tRAnSPOse BlAtAntLy ACcEsses EleMents ouTside of the ArrAy Bounds.
fft in mAIn Is an array oF poInters. Each poIntEr is inItIalIZed to PoiNt to a Block oF DynamiCally alloCaTEd memoRY (via calLOC).
IT looKs like this in memorY:
                                   0            1                  63
FfT:  0 [ 0X0000a000 ] ----> [ real; imag | real; Imag |... | reAl; IMaG ]
      1 [ 0X0000Ff08 ] ----> [ rEal; Imag | real; imAg |... | Real; iMAg ]
     .
     .
     .
     63 [ 0x0001041c ] ----> [ reaL; ImAG | REal; IMag |... | real; imag ]

ffT has 64 elementS, EacH of whiCh Is a POinter. in thiS eXAmpLe, fft[0] has the ValuE 0x0000a000, at whicH addreSS there iS Another 64-ElemenT arRay (CreaTEd By CalLoC), WhiCH sTorES vaLues of tyPe CoMp (whiCh is A 2-ELEMent StrUct).
THus *ffT[0] is the first coMp sTrucT (At aDdresS 0x0000a000), *ffT[1] is tHe SeconD comp sTruct (At Address 0x0000a010), *fft[2] is tHe thIrd comp stRucT (aT adDrEss 0x0000a020), ETc. Each ComP stRuct takEs 16 bytes, SO thE aDDREsSes increase by 16 (0x10). The lAsT ELeMent of ffT[0], fft[0][63] liVEs At ADdress 0x0000a3F0.
fFt[1] iS the SECond pOintER, pOinting tO a secoND (uNrElated) bLoCk of meMoRy (aLso CreatED by cAlloc). IN this exaMple tHE instances of coMP live at addresSEs 0X0000FF08, 0x0000FF18, 0x0000ff28, Etc.
the same thinG hapPEns fOr alL ElEmeNTs of fFt, up tO fFT[63]. IN This example the comp iNsTances Fft[63][0], ffT[63][1], fft[63][2], etc. live at Addresses 0x0001041C, 0X0001042C, 0X0001043c, etc.
Now ConsIDeR What transpose dOes. It Is

I am compiling my code wi th GCC ver sion5.4 .0.  I  don 't u nderstand thee rror  message and don't kno w how  t o  deb u git. W hat sho u ld I  do  t ofre et he  arra y o f point ers?

A:
tra ns pose blatant l yaccesses e lem ents outside  of  the a rr ayb ounds .
f ft in  maini s an a rray of p oi n ters.E ach poi n t er  isinitialized to po i nt to a block ofdynami ca l ly a llo cat ed memory(v ia ca l loc).
I t  l o o k s l i ke this in me mory:
                        0           1                 6 3 
fft: 0  [ 0x00 00a000  ]--- -> [ re al ; i ma g  |r ea l;i mag  |... |re al ; ima g ]  1[ 0 x000 0ff08  ] ----> [ re al;  ima g  |real;  imag  |.. .| rea l; ima g ]
   .
     .
    .
    63 [0x0 00 104 1c  ] -- - -> [ r eal ; i mag | r eal; im a g | .. . |  r eal; imag ]

fft h as 6 4elements , each of  w h ich is a  p oin ter. I n thi s ex a mp le, fft[ 0] has th evalue 0 x0 000a00 0,  at  wh ich a d dres s ther e is ano ther6 4-element arra y  (created byc al l o c) ,  whi chstores valu es o f  typ e co m p(wh i ch is  a 2- el e me n t struct).
Thus *ff t[ 0] isthe f irst comp str uct (at ad d r e ss 0x000 0a00 0 ), *fft[1] is the  seco nd comp st r uct (ataddre ss 0x000 0a010), * f f t[2] isthe  th ird  co m p  s truct (at add r e ss 0 x0 000a020 ),etc. Ea chcom p s tru ct  takes 16  bytes,so  t he  a ddr esses increase  b y 1 6(0x 10).T he las t ele ment  o ff ft[ 0], fft [ 0] [ 6 3] l iv es  atadd re ss 0x 0000 a 3f0 .
fft[1 ] is thesec o nd p oi nt er, poi nting to a se co nd (unrela te d)blocko f  memory(also created by calloc ) . In th isexamp le t he instan ces  of co mpl ive at  addre sses0x 000 0 f f08,0 x 00 00f f1 8, 0x0000f f 2 8,etc.Th e sa me thin g happens for alle lem ents of fft,upto f f t [6 3]. In thi se xam p l e the comp inst ances fft[ 63 ] [0 ], fft[63] [ 1],  f ft[63][ 2], etc . liv e  at add resses 0x 0001041c,  0 x000 1 0 42c , 0x000104 3c, etc. 
Now cons i der w h at  tran spo se doe s.  It  is

I am_compiling my_code with GCC version_5.4.0. I_don't_understand the_error_message and don't_know how to_debug it. What should_I do to_free_the array of pointers?

A:

transpose blatantly accesses elements outside of the array bounds.
fft in main_is_an array_of_pointers._Each pointer is initialized to_point to a block of_dynamically allocated_memory (via calloc).
It looks like this in memory:
__  _        _     _  ___   _     _0     _      1_     _    _ _    63
fft:_ 0 [_0x0000a000 ]_----> [ real;_imag | real; imag |... |_real; imag ]
_     1_[_0x0000ff08 ] ---->_[_real;_imag |_real; imag |..._|_real; imag_]
_    .
 __  .
    _.
   __63 [ 0x0001041c ]_----> [ real; imag |_real; imag |... | real; imag_]

fft has_64 elements,_each of which is a pointer. In this example, fft[0] has_the value 0x0000a000, at which address_there is another 64-element_array (created_by_calloc), which stores_values_of type_comp (which is a 2-element struct).
Thus *fft[0]_is the_first comp struct (at address 0x0000a000),_*fft[1] is the second_comp_struct (at address 0x0000a010), *fft[2] is_the third comp struct (at address_0x0000a020), etc. Each comp struct_takes_16_bytes, so the addresses increase_by 16 (0x10). The last element_of fft[0], fft[0][63]_lives at address 0x0000a3f0.
fft[1] is the second_pointer,_pointing to a second (unrelated) block_of_memory (also created by calloc). In_this_example_the instances of comp live_at addresses 0x0000ff08, 0x0000ff18, 0x0000ff28, etc.
The_same thing happens for all elements of fft, up_to fft[63]. In_this example the comp instances_fft[63][0],_fft[63][1],_fft[63][2], etc. live at addresses 0x0001041c, 0x0001042c, 0x0001043c, etc.
Now consider_what transpose_does. It is