heap block not aligned

Joel Sherrill joel.sherrill at OARcorp.com
Sat Mar 9 13:49:14 UTC 2002



Gerald Needell wrote:
> 
> If I understand your question correctly, the offending code is a call to :
> _Heap_Free( &_Workspace_Area, block)
> 
> thsi is called from _Workspace_Free which was called by
> _Thread_Stack_Free    called by
> _Thread_Close  called by
> _ rtems_task_delete
> 
> so I guess it is block taht is getting clobbered. ITs starting address
> in _Heap_Free is reported to be 0x23ebec6  which is clealy not word
> aligned.

That is in the "Start" substructure of the TCB and it definitely looks 
like it is getting clobber or incremented. 

> Thanks - Jerry
> 
> BTW how are the signups for the class going.

It has not reached the minimum yet. :(

> Joel Sherrill wrote:
> 
> >
> > Gerald Needell wrote:
> >
> >>I am getting a memory alignment error (BSP - ERC32) in a call to
> >>_Heap_Is_Block_free. THis only occurs if I use the "debug" version of
> >>RTEMS (I am using. 4.5.1 pre 3). The failure occurs when I try to delete
> >>the "Init" task. I have traced the code and indeed the pointer the_block
> >>is set to a non word aligned value. Any clues how to proceed with this?
> >>
> >
> > What logical piece of data is being freed?  The stack, etc.
> >
> > I would tend to think that something is corrupting the pointer to
> > be freed.  For example, RTEMS returns the stack using a pointer
> > it stored away at init time.  If that gets corrupted all bets
> > are off.
> >
> > Once we know what logically is being returned, we can monitor
> > that location in memory and binary search in on the corrupting point.
> >
> >
> >>thanks - Jerry
> >>--
> >>_______________________________________________________________________
> >>Jerry Needell                     | Internet: jerry.needell at unh.edu
> >>Space Science Center/Morse Hall   | Voice: (603) 862 2732
> >>University Of New Hampshire       | FAX:   (603) 862 0311
> >>Durham, NH 03824                  |
> >>
> >
> 
> --
> _______________________________________________________________________
> Jerry Needell                     | Internet: jerry.needell at unh.edu
> Space Science Center/Morse Hall   | Voice: (603) 862 2732
> University Of New Hampshire       | FAX:   (603) 862 0311
> Durham, NH 03824                  |

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list