8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e252873 commit db75d2cCopy full SHA for db75d2c
cores/esp8266/StackThunk.cpp
@@ -26,6 +26,9 @@
26
27
#include <stdint.h>
28
#include <stdlib.h>
29
+#include <stdio.h>
30
+#include "pgmspace.h"
31
+#include "debug.h"
32
#include "StackThunk.h"
33
#include <ets_sys.h>
34
@@ -46,6 +49,11 @@ void stack_thunk_add_ref()
46
49
stack_thunk_refcnt++;
47
50
if (stack_thunk_refcnt == 1) {
48
51
stack_thunk_ptr = (uint32_t *)malloc(_stackSize * sizeof(uint32_t));
52
+ if (!stack_thunk_ptr) {
53
+ // This is a fatal error, stop the sketch
54
+ DEBUGV("Unable to allocate BearSSL stack\n");
55 55C2 code>
+ abort();
56
+ }
57
stack_thunk_top = stack_thunk_ptr + _stackSize - 1;
58
stack_thunk_save = NULL;
59
stack_thunk_repaint();
0 commit comments