Code Crashing in v14 tools

If you have a simple question and just want an answer.
Post Reply
Redeye
XCore Addict
Posts: 131
Joined: Wed Aug 03, 2011 9:13 am

Code Crashing in v14 tools

Post by Redeye »

I have a project which has been compiling and running fine on v13.1 and v13.2 tools for a long time. I'm just trying to move this code to the v14 tools and the code compiles fine, but it keeps crashing every time it hits one of several functions which look like this :

void function(char *pData, datastruct *pStruct)

{

    ((int*)pData)[0] = pStruct->intMember;

}

The crash I'm getting is an ET_LOAD_STORE memory access exception. Comparing the disassembly of the same functions in the two tools versions they look very different, the main difference being that the v13 code calls a __misaligned_store() function whereas the v14 code doesn't.

As far as I can see this is a perfectly valid C pointer cast and the same code compiled and ran fine on v12 and v13 tools.

So, my questions :

1. Is this a tools bug?

2. Has anyone got any suggestions on how to stop this code crashing?



Post Reply