This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AER access memory outside allocated buffers


I have included the AER library in my system and it seem to work fine. My worry is that I see some memory accesses outside the AER buffers when aerReceiveIn() is executed.

The bundled test code is used as a reference for my setup.

The memory buffers "requested" by aerGetSizes()  are allocated by a simple routine (AerCalloc())that will put a "marker" between each buffer:

tword aer_buffers[60*1024];
tword * aer_buffers_free_p = aer_buffers;
tword * aer_buffers_end_p = aer_buffers + sizeof(aer_buffers)/sizeof(tword);

//Simpe Calloc function that alloc aligned from static pool. No free support
static void * AerCalloc_core(int size, int log_align)
void * ret_p = NULL;
if(size > 0 || log_align > 8)
if(log_align < 3) log_align = 3; //align all to at least 8byte
tword * aer_buffer = aer_buffers_free_p;
while((Uint32)aer_buffer & ((1 << log_align) - 1))
if((aer_buffer + size) < aer_buffers_end_p)
ret_p = aer_buffer;
aer_buffers_free_p = aer_buffer + size;
memset(ret_p, 0, sizeof(tword) * size);

static void * AerCalloc(int size, int log_align)
void * ret_p = AerCalloc_core(size, log_align);
void * guard_p = AerCalloc_core(16, 4);
memset(guard_p, 0xcc, 16);

What I can see is that the marker between buffer 8 and 9 (from 0 to 20) is overwritten by a memcopy called by the library during aerReceiveIn() execution.

The AER is working fine, and non of the other markers are overwritten, so I am starting to suspect that this is some undiscovered bug in the library ()

In my case this is not really a problem since the overwritten memory is not used by system code, but I assume that it might be my configuration that is wrong somehow.

One other thing.. When running continuous updates of graph windows in the debugger, is it expected to get abort "CPU Exception: Internal: Loop buffer exception; Missed stall exception;"? Or is this an indication of some real problem?