Stack smashing protect failure!

  • Hello guys,
    I use Visual Studio Code with Platformio and M5stack Core/Arduino and this error "Stack smashing protect failure!" appear always at the end of a function on the } line
    I have read a lot on internet and seems it's a Stack protect level procedure that make this problem, any know how to resize Stack on a M5Stack/arduino software ?
    Or how to print the Stack size and free space ?
    Many thanks for your help

    My Platformio.ini
    platform = espressif32
    board = m5stack-core-esp32
    framework = arduino