Language
Showing results for 
Search instead for 
Do you mean 

C Program abort in lib function strspn

Occasional Visitor

C Program abort in lib function strspn

My program continues to abort with a TRAPS 68 (Data memory protection trap), but the problem seems to stem from any call to fprintf that exists in my code. I am using fprintf to write trace code to the $STDLIST file, as this program is a son process started by another MPE program and I don't have control over directing the standard list data.
It seems that, after so many calls to fprintf, the program fails. Does fprintf have a problem with writing data to the the STDLIST file if the write exceeds the output record size? It hasn't so far...

Any illuminating questions or ideas would be appreciated.
2 REPLIES
Occasional Visitor

Re: C Program abort in lib function strspn

Never mind...I discovered a strtok call that was improperly set up.

The moral here: never call strtok with NULL as the second arg.
Honored Contributor Honored Contributor

Re: C Program abort in lib function strspn

Hello Jon,

Thanks for sharing the resolution. I'm sure it is appreciated by the MPE users community.
King is the customer!