espressif / esp-aws-iot

AWS IoT SDK for ESP32 based chipsets
Apache License 2.0
256 stars 154 forks source link

coreHTTP memory allocation failure with esp-idf 5.0 (CA-278) #170

Open khuangCTS opened 1 year ago

khuangCTS commented 1 year ago

Hello,

I am encountering and issue with porting over my application code to esp-idf v5.0.1 from v4.4.4. For context, I am using coreHTTP to connect and retrieve temporary security credentials from AWS IoT. With v4.4.4 I am able to successfully send a HTTP GET request to my credentials endpoint but with v5.0.1 I am encountering and issue specifically with esp-tls-mbedtls/esp-aes.c (in mbedtls/port/aes/). I have been experimenting with different allocation modes and have gotten memory allocation for each option.

mbed_crt failed sues with each option. This is with the internal memory option. With other options allocation options I retrieve "esp-aes: memory allocation failed". I looked deeper into the source code and it appears to be failing to allocate memory for the output buffer.

Any help would be appreciated.