To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2009
2008  |  2010
Subject: 
Re: legOS - Does it work for you?
Newsgroups: 
lugnet.robotics
Date: 
Thu, 31 Dec 1998 17:53:21 GMT
Original-From: 
John A. Tamplin <jat@traveller&AvoidSpam&.com>
Viewed: 
1549 times
  
On Thu, 31 Dec 1998, Rick Kimball wrote:

I tried that with the same results.  At that point, I added some
debug messages to the malloc and free routines.  Using the demo
light-sensor program I wrote down the addresses returned by malloc.
There are only two calls per execi, the process_data structure (AKA pid)
and the stack for process.  However, when the program ends and
mm_reaper free is being called with bogus addresses.  They are not
the same ones previously returned from the malloc calls.  Which
leads me to the conclusion that the task management routines, or
my compiler is not doing the right thing.

From previous embedded development efforts, the first thing to look at
when weird things happen is stack overflow.  In legOS, interrupt handlers
run on the user threads' stack which makes it easier to overflow them.
Since thread stacks are allocated using the standard memory allocation
routines, if they overflow they will trash the malloc pointer chains.  I
would suggest adding stack checks at various places which verify the
current stack pointer is within the range for the current thread.

My real question, is my gcc setup wrong or does the light-sensor
demo stop working properly for everyone after the 6th time you
toggle the run button on and off?

Unfortunately, I am still trying to find a problem with gas or gld on my
AIX box, since it fails to link due to relocation fixup overflow.  This
happens even on a very simple assembler input, so I know it is a problem
in one of those two.  In fact, if someone would send me kmain.o from a
working setup, I can isolate it to the assembler or the linker.

John A. Tamplin Traveller Information Services
jat@Traveller.COM 2104 West Ferry Way
256/705-7007 - FAX 256/705-7100 Huntsville, AL 35801

--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message is in Reply To:
  Re: legOS - Does it work for you?
 
(...) I tried that with the same results. At that point, I added some debug messages to the malloc and free routines. Using the demo light-sensor program I wrote down the addresses returned by malloc. There are only two calls per execi, the (...) (26 years ago, 31-Dec-98, to lugnet.robotics)

12 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
1 hour ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR