C Program abort in lib function strspn (81 Views)
Reply
Occasional Visitor
Jon Blanchard
Posts: 2
Registered: ‎03-15-2005
Message 1 of 3 (81 Views)

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.
Please use plain text.
Occasional Visitor
Jon Blanchard
Posts: 2
Registered: ‎03-15-2005
Message 2 of 3 (81 Views)

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.
Please use plain text.
Honored Contributor
Kwan Fong, Emile
Posts: 1,162
Registered: ‎07-10-2000
Message 3 of 3 (81 Views)

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!
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation