#include "Arduino.h"

String stringOnStack;

void setup() {
  String* fakeHeapString = new (&stringOnStack) String; // placement new -> fakeHeapString points to stack instead to heap memory
  delete fakeHeapString; // kaboom: trying to free memory from stack
}

void loop() {}
Loading
esp32-s3-devkitc-1