This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reentrant function problems with memcpy()

I have a reentrant function that is passed a single parameter as follows:

void Filt_QR ( FilterDataType * FilterData )  reentrant
{
    unsigned char aucTemp40[5];
    memcpy( aucTemp40,                /*   void * dest   */
            FilterData->aucYpterm_40, /*   void * src    */
            5);                       /*   int    len    */

...

The memcpy() call always gets the destination wrong, but the source is correct. The single passed in parameter is a structure containing a few 5 byte char arrays and a long and a char. No big deal. If I make it a normal (not reentrant) function, everything is fine. I made my own "memcopy" type function, same result.
Yes, I have XBPSTACK set to 1.
This is driving me nuts. Any help will be appreciated.

0