I sought more deeply  and after analysing the  map file of the linker , 
I find that the break of variable occur when I get message from my IPC 
system V message queue !
The msgrcv function can write one byte ( perhaps more ??) after the 
buffer , and only with the arm-gcc !

See under : my original get message function  from the message queue :

//---------------------------------------------------------------------------//
// Extract message in message queue
//---------------------------------------------------------------------------//
TBOOL bFFMSG_ReceiveMsg( T_FMSG_OBJECT * ptObjFm, key_t tKeyFm , long 
lType )
{
// Get ID of mq
 int iFileMsgID = msgget( tKeyFm, 0700 );
 // Get Msg in mq
 if( msgrcv( iFileMsgID, &ptObjFm , sizeof(T_FMSG_OBJECT), lType, 
IPC_NOWAIT ) < 0) return (aFALSE);
  // succes
 return (aTRUE);
}

See under : the test get message function  from the message queue :

//---------------------------------------------------------------------------//
// Extract message in message queue ( with local protection and test 
program)
/ / => result :
// ### msgrcv test program ###
// ## 00 ## 53 ## 53 ## 53 ## 53
//---------------------------------------------------------------------------//
TBOOL bFFMSG_ReceiveMsg( T_FMSG_OBJECT * ptObjFm, key_t tKeyFm , long 
lType )
{
   T_FMSG_OBJECT tObjFm;
   TUCHAR tcProtect[] =  {0x53, 0x53, 0x53, 0x53, 0x53 }
 // Get ID of mq
 int iFileMsgID = msgget( tKeyFm, 0700 );
 printf("### msgrcv test program ###\r\n");
 // Get Msg in mq
 if( msgrcv( iFileMsgID, &tTmp.tObjFm , sizeof(T_FMSG_OBJECT), lType, 
IPC_NOWAIT ) < 0) return (aFALSE);
printf("## %02x ## %02x ## %02x ## %02x ## %02x \r\n, tcProtect[0], 
tcProtect[1], tcProtect[2], tcProtect[3], tcProtect[4], )
// Copy Msg to user
 memcpy( ptObjFm, &tTmp.tObjFm, sizeof(T_FMSG_OBJECT) );
  // succes
 return (aTRUE);
}



Nicolas TOUCHARD a écrit :
> Marc Kleine-Budde a écrit :
>   
>> Nicolas TOUCHARD wrote:
>>   
>>     
>>> on my host PC gcc 3.3.5
>>> the cross compiler with the ptxdist 0.10.4 : gcc 4.0.2
>>>
>>> other remarks. I'v 2 process and the procces communicate with message 
>>> file (IPC sytem V). The bug occur in procces 1 when the other send a 
>>> command.
>>>     
>>>       
>> Have you verified that this work on the PC. Are you sure you don't have 
>> a bug in you application.
>>
>> Is there a chance for a (minial) testcase?
>>
>> Marc
>>
>>   
>>     
>
> Yes I 've verified  ( I've jsute repeat the test) and it's work on my 
> host PC . I hope it's just a bug :-)  , I try to isolate the moment when 
> the variable is broke ...
>
>
>
>   


-- 

Nicolas Touchard
NKE electronics
Rue Gutenberg Z.I. de Kerandré
56700 HENNEBONT - FRANCE
Email : [EMAIL PROTECTED]
Tél. : (33) 2-97-36-10-12
Fax : (33) 2-97-36-55-17 


-- 
ptxdist mailing list
[email protected]

Reply via email to