Help needed with heap corruption

orbitcoms
Posts: 147
Joined: Fri Aug 03, 2018 10:08 pm
Location: Sydney, Australia

Help needed with heap corruption

Postby orbitcoms » Thu Mar 18, 2021 5:40 am

I am not sure what do you next to find out why my ESP is resetting.

I get output below when running the code.

*******************************************************************

CORRUPT HEAP: Bad head at 0x3ffbb6a8. Expected 0xabba1234 got 0x3ffbddec

abort() was called at PC 0x400829d2 on core 0
0x400829d2: lock_acquire_generic at C:/esp/esp-idf/components/newlib/locks.c:142


Backtrace:0x40085baf:0x3ffbaff0 0x4008624d:0x3ffbb010 0x4008a2ae:0x3ffbb030 0x400829d2:0x3ffbb0a0 0x40082af5:0x3ffbb0d0 0x400f520d:0x3ffbb0f0 0x400f0ee5:0x3ffbb3b0 0x400f0de8:0x3ffbb400 0x40089fd5:0x3ffbb430
0x40081462:0x3ffbb450 0x4008a2d9:0x3ffbb470 0x400d4dd8:0x3ffbb490 0x40086255:0x3ffbb4b0
0x40085baf: panic_abort at C:/esp/esp-idf/components/esp_system/panic.c:330

0x4008624d: esp_system_abort at C:/esp/esp-idf/components/esp_system/system_api.c:106

0x4008a2ae: abort at C:/esp/esp-idf/components/newlib/abort.c:46

0x400829d2: lock_acquire_generic at C:/esp/esp-idf/components/newlib/locks.c:142

0x40082af5: _lock_acquire_recursive at C:/esp/esp-idf/components/newlib/locks.c:170

doragasu
Posts: 15
Joined: Sat Apr 27, 2019 5:18 pm

Re: Help needed with heap corruption

Postby doragasu » Thu Mar 18, 2021 7:38 am

These problems can happen when you overwrite a local variable usually through a pointer (e.g. you write more bytes in an array than its length).

Who is online

Users browsing this forum: MicroController, VivekBorse and 127 guests