Serial. This article is written to introduce the error that the system detected an overrun of a stack-based buffer in this application and provide some possible fixes. This is a security mechanism implemented by gcc/g++ to prevent buffer overflow exploits using -fstack-protector. To simplify, stack smashing putting more data into a stack than its holding capacity. A stack, a first-in last-out circuit, is a form of buffer holding intermediate results of operations within it. This may lead to subverting the program/system and crashing it. #include Īdafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial) Stack Smashing here is actually caused due to a protection mechanism used by gcc to detect buffer overflow errors. stack smashing detected error occurs when as the name suggests, you smash the stack, meaning that you have a buffer overflow and the canary gets overwritten by a different value. Stack smashing is a form of vulnerability where the stack of a computer application or OS is forced to overflow. I have project that uses ESP32 Dev Module to get fingerprint template from the fingerprint module R307 but I keep getting error “stack smashing protect failure” while I print the template.