Exception 6

Angelo Fraietta angelo_f at bigpond.com
Mon May 6 00:48:06 UTC 2002


I have finally worked this one out -- I have been chasing two different 
faults. The first error was caused by not checking the return value of 
an open routine. This caused the code to jump to an address given by an 
invalid function pointer (this was because the open failed). This is why 
modifying the code in what seemed unrelated areas to fail -- this was 
related to where the code was jumping to in the invalid function pointer.

The second fault is that the stack on the initial thread has become over 
run when creating the other tasks.  I was able to ascertain this by 
commenting out code further into the call stack until the fault no 
longer occurred. I overcame this by calling the functions that start 
these threads within the context of the task with the largest stack size.

The difference between the DX and the SX may have had something to do 
with the way memory is treated by the processors.

Angelo Fraietta wrote:

> The really frustrating part of this is that I have a build that runs 
> fine on the DX, but if I attempt to run it on the DIMMPC it crashes. I 
> have the same amount of memory on both machines, and the section of 
> code that causes it to crash used to run fine.
>
> Angelo Fraietta wrote:
>
>> I now have the problem again. The error I get from the DIMMPC (which 
>> is an SX) is as follows:
>>
>> Exception 6 caught at PC 3ff091 by thread 134283266
>>
>> EAX = 7d203cf7     EBX = 0    ECX = 74    EDX = F000e2c3
>> ESi = 2     EDI = 0 EBP = 18D5BF    ESP = CE4
>>
>> Errror code (if not 0) = 0
>>
>> For the 386DX, I get This error
>>
>> Exception 13  caught at PC1 by thread 134283266
>> EAX = 0     EBX = 0    ECX = 1C    EDX = F000e2c3
>> ESi = 0     EDI = 173EF8     EBP = 18E384    ESP = 18E324
>>
>> Error code (if not 0) = F000
>>
>> If I start adding and removing sections of code, the error changes. 
>> For example, I removed code from within an interrupt handler that I 
>> had not enabled, the error has gone.
>>
>> Any suggestions on What to Do?
>>
>>
>> Joel Sherrill wrote:
>>
>>>
>>>Angelo Fraietta wrote:
>>>
>>>>I forgot to say I am using pc386dx bsp
>>>>
>>>>Angelo Fraietta wrote:
>>>>
>>>>>What could be causing an exception 6. I have looked in cpu.h and it
>>>>>saya it is an illegal instruction.
>>>>>What causes this type of fault?
>>>>>
>>>
>>>I think this means invalid instruction which likely means you have
>>>corrupt code or jumped somewhere wrong.
>>>
>>>Was the reported address inside or outside your program?
>>>
>>>>--
>>>>Angelo Fraietta
>>>>
>>>>PO Box 859
>>>>Hamilton NSW 2303
>>>>
>>>>Home Page
>>>>
>>>>http://www.users.bigpond.com/angelo_f/
>>>>
>>>>There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
>>>>There are those who seek knowledge to be known by others - that is VANITY
>>>>There are those who seek knowledge in order to serve - that is LOVE
>>>>    Bernard of Clairvaux (1090 - 1153)
>>>>
>>>
>>
>>-- 
>>Angelo Fraietta
>>
>>PO Box 859
>>Hamilton NSW 2303
>>
>>Home Page
>>
>>
>>http://www.users.bigpond.com/angelo_f/
>>
>>There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
>>There are those who seek knowledge to be known by others - that is VANITY
>>There are those who seek knowledge in order to serve - that is LOVE
>>    Bernard of Clairvaux (1090 - 1153)
>>
>>
>
>-- 
>Angelo Fraietta
>
>PO Box 859
>Hamilton NSW 2303
>
>Home Page
>
>
>http://www.users.bigpond.com/angelo_f/
>
>There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
>There are those who seek knowledge to be known by others - that is VANITY
>There are those who seek knowledge in order to serve - that is LOVE
>    Bernard of Clairvaux (1090 - 1153)
>
>

-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


http://www.users.bigpond.com/angelo_f/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20020506/1ee2a0a3/attachment-0001.html>


More information about the users mailing list