rtems_message_queue_receive / rtems_event_receive issues

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Oct 10 12:31:45 UTC 2018


On 10/10/2018 14:27, Catalin Demergian wrote:
> I was debugging to follow what's going on with the state of the task 
> in _Event_Seize and
> when trying to step over _Thread_Dispatch_enable( cpu_self ) call at 
> the end of the function I got this in the debugger
>
>
> 0x80acf38->_Heap_Walk->_Heap_Walk_check_control->_Heap_Walk_check_free_list->_Thread_Handler->_CPU_Thread_Idle_body
>
> heapwalk.c:331->heapwalk.c:240->heapwalk.c:105->threadhandler.c:95->armv7-thread-idle.c:33
>
>     if ( free_block->prev != prev_block ) {
>
> (*printer)(
>
> source,
>
> true,
>
> "free block 0x%08x: invalid previous block 0x%08x\n",
>
> free_block,
>
> free_block->prev
>
>  );
>
> return false;
>
> }
>
>
> what does that mean? is this a memory corruption of some kind ?
>
> it seems the message "free block 0x%08x: invalid previous block 
> 0x%08x\n" is printed somewhere, but I don't know
>
> how to see these messages in RTEMS, is there a command like dmesg in 
> Linux ?
>

This looks more like a debugger issue which seems to have problems to 
decipher the stack frame.

The _Thread_Dispatch_enable( cpu_self ) may lead to a context switch 
which must be done via a supervisor call exception. If your debugger 
disables this somehow you execute arbitrary code.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the users mailing list