Exception 6

Angelo Fraietta angelo_f at bigpond.com
Sun Apr 14 23:51:40 UTC 2002


I am almost dead sure that this is the case now. I had an original bit 
of code that went

                    if(pMidiOut[dev_num])
                        {
                            pMidiOut[dev_num]->SetTxReady(false);
                        }
                   
                    if ((io_in_data & DIAG_MESSAGE_MASK) == 
DIAG_MESSAGE_MASK)
                   
and it crashed big time.
I changed the code to

        if ((io_in_data & DIAG_MESSAGE_MASK) == DIAG_MESSAGE_MASK)
            {
                    if(pMidiOut[dev_num])
                        {
                            pMidiOut[dev_num]->SetTxReady(false);
                        }
            .... etc
            }
        else
            {
                    if(pMidiOut[dev_num])
                        {
                            pMidiOut[dev_num]->SetTxReady(false);
                        }
            .... etc
            }

and it worked fine. So I believe it is definitely something to do with 
the alignment of the code.

                       

   



Angelo Fraietta wrote:

> The problem is still there, however, the results vary depending upon 
> what I do within the code. I believe that it has something to do with 
> the way the code is packed and aligned. If I remove a single line of 
> code in a function such as a comparison, the program may go into this 
> infinite exception loop. If I remove a line of code else where, the 
> tasks may return that they have started, but the tasks don't actually 
> start running (I added some diag code to show me when the actual task 
> function is entered). I add a line of code somewhere else, such as a 
> cout, ant the program runs fine. It may have something to do with the 
> linking, causing the code to jump to an incorrect address.
>
> 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)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20020415/6cbe0b4d/attachment.html>


More information about the users mailing list