On systems with with a processor that does not support performancemonitor.resource, e.g. the AMCC PowerPC 440EP, profil() generates a DSI at process termination when buffer == 0. A pointer to PerformanceMonitorIFace is never obtained, and the call to IPM->EventControlTags() when buffer == 0 attempts to dereference a NULL pointer. A quick fix might check that IPM != NULL before disabling profiling:
profil(unsigned short *buffer, size_t bufSize, size_t offset, unsigned int scale)
if (buffer == 0)
Stack = SuperState();
Log in to post a comment.