From: Nicholas N. <nj...@ca...> - 2003-04-30 19:34:25
|
On Wed, 30 Apr 2003, Xiang Yan wrote: > 2. I have two errors in following oci call: > ==13548== Thread 4: > ==13548== Invalid write of size 4 > ==13548== at 0x81FFE55: kpughndl0 (in..) > ==13548== by 0x82071A3: kpughndl (in ..) > ==13548== by 0x81DBFBA: kpubndp0 (in ..) > ==13548== by 0x8077F74: OCIBindByPos (in .. /* &pocibind[0,1..n-1] as a param of this call*/ ) > ==13548== Address 0x41B6BA44 is 8 bytes after a block of size 4 alloc'd > ==13548== at 0x400485EC: __builtin_vec_new (vg_clientfuncs.c:156) > ==13548== by 0x8062AE8: myapp::prepareparams(void) (myapp.cpp:1270 /* OCIBind **pocibind = new OCIBind*[n]; */) > ... > Can I have more insight on "Address 0x41B6BA44 is 8 bytes after a block > of size 4 alloc'd" ? Your function kpughndl0() accesses the address 0x41B6BA44 which is invalid -- not addressible. However, it comes only 8 bytes after the end of a valid block allocated with new[] in myapp::prepareparams(), so there's a good chance that you've overrun the end of the block. N |