title: ESP32 Stack canary watchpoint triggered. Why?
body: <p>I have a program that can encrypt and decrypt a text with Boneh-Franklin encryption. This works great on a PC, but for some reason causes a constant reboot on ESP32 with the following error message:</p>
  <pre><code>setup2
  setup2.2
  setup2.3
  Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception)
  Debug exception reason: Stack canary watchpoint triggered (loopTask) 
  Core 1 register dump:
  PC      : 0x40083774  PS      : 0x00060b36  A0      : 0x3ffb0120  A1      : 0x3ffb0060  
  A2      : 0x68efa751  A3      : 0x3ffb0938  A4      : 0x3ffb0720  A5      : 0xfb879c5c  
  A6      : 0x61b36b71  A7      : 0x0006970f  A8      : 0x01709af4  A9      : 0x01709af4  
  A10     : 0xfaa5dfed  A11     : 0x01a3ff3b  A12     : 0x76651dec  A13     : 0x00000001  
  A14     : 0x00000000  A15     : 0x04adbe74  SAR     : 0x0000001e  EXCCAUSE: 0x00000001  
  EXCVADDR: 0x00000000  LBEG    : 0x400f1cc5  LEND    : 0x400f1cc9  LCOUNT  : 0x00000000  
  
  ELF file SHA256: 0000000000000000
  </code></pre>
  <p>I use an Arduino ESP32 environment, CONFIG_ARDUINO_LOOP_STACK_SIZE is set to 8192 in main.cpp, 8k stack should be enough to run it. It works perfectly on PC, it’s a mystery to me why not on ESP32. Can anyone help? I absolutely ran out of ideas.
  For the Boneh-Franklin implementation I used this library: <a href="https://github.com/miracl/core" rel="nofollow noreferrer">https://github.com/miracl/core</a>
  My own code is ~200 lines, I have uploaded it to Google Drive: <a href="https://drive.google.com/file/d/1EY0mGC2UiVNhE68b5Q0VB9JIY2Owbpxg/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1EY0mGC2UiVNhE68b5Q0VB9JIY2Owbpxg/view?usp=sharing</a></p>