Richard Breyer

Starcore ADS Crash

Discussion created by Richard Breyer on Nov 8, 2006
Latest reply on Nov 10, 2006 by CrasyCat
I am using the MSC8122ads development board. I noticed a crash when I entered my program. I isolated the print statement and began to dig. Ultimately I discovered that the code went off the track and into the weeds (illegal instruction trap) at the point labeled below ( I believe it jumps in response to stream flag = 9 and goes to an incoherent instruction.)
I was told that I should try to get my problem fixed here since the development staff is overworked. Can anyone suggest a patch or a fix?
These values represent the initial conditions:
ptr = 0x23B60 ; size= 1 ; nmemb = 23 ; stream->_flag = 9 ;
After stepping from PC = 01012E7E this goes to illegal instruction land
This code is from fwrt__common_,c

/* check for basic errors */
if ( NULL == ptr || 0 >= size || 0 >= nmemb ||
( !( stream->_flag & _IOWRITE ) && !( stream->_flag & _IORW ) ) )
{
stream->_flag |= _IOERR;
return (size_t) 0;
}
/* check for basic errors */
if ( NULL == ptr || 0 >= size || 0 >= nmemb ||
01012E46: 24E0EAF1 zxt.l d1 & tsteqa r2
01012E4A: 251882E0 bt >*+$2e0 ;fwrite+0x32a (0x101312a)
01012E4E: 64E9 tsteq d1
01012E50: 3820A000F0D5251882DA move.l (sp-$54),d8 & bt >*+$2da ;fwrite+0x32a (0x10
01012E5A: 3400A0046469 tsteq d81012E60: 96C0FCD6251882CA move.l (sp-$58),r4 & bt >*+$2ca ;fwrite+0x32a (0x101312a)
01012E68: 90C0 nop
01012E6A: 2C0F8004 adda #>$4,r4,r7
01012E6E: 5597 move.l (r7),d5
01012E70: 9AC03B1A800890C03B1B8100 and #$8,d5,d2 & nop & and #$100,d5,d3
01012E7C: 6569 tsteq d2
01012E7E: 8409 bf *+$8 ;fwrite+0x86 (0x1012e86) ------ death by illegal instruction
01012E80: 65E9 tsteq d3
01012E82: 251882A8 bt >*+$2a8 ;fwrite+0x32a (0x101312a)
( !( stream->_flag & _IOWRITE ) && !( stream->_flag & _IORW ) ) )
{
stream->_flag |= _IOERR;
return (size_t) 0;
)
/* check for EOF error */
if ( stream->_flag & _IOEOF )
{
/* input cool on update buffers */

Outcomes