It's UWAweek 48


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying selected article
Showing 1 of 919 articles.
Currently 8 other people reading this forum.

 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

3:25pm Wed 7th Sep, Christopher M.

> I've had a "stack smashing detected" error come up. > I'm not too sure how to start debugging this so any help would be appreciated.
The most likely *cause* of this is attempting to write too many characters into a local variable that is a character array. The compiler 'plants' extra information on the program's runtime stack to detect this form of problem - when your program attempts to return from the function, the extra code and data 'planted' on the stack are used to detect if your program's actions have corrupted the stack (the extra characters written into the array will likely have overwritten the function's return address). (longer explanation: ) Suggest that you look for places where relatively small local character arrays may be overwritten (beyond their declared length) by too much data.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy