-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guru Meditation Error: Core 0 panic'ed (LoadStoreAlignment) caused by ODR violation. (IDFGH-5506) #7236
Comments
Hi @b1ackviking thanks for reporting this. libstdc++ __cxx_eh_arena_size_get is defined as weak function so this is probably not related to any ODR violation. Seems like buffer ends up unaligned. We'll take a look at it. |
Thanks for reporting, fix is available 3907634, feel free to reopen. |
Hi @Alvin1Zhang and @ESP-Marius,
The problem is in the esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c Lines 108 to 117 in b63ec47
Should be: /* Function to xor two data blocks */
static void xor_data(uint8_t *dst, const uint8_t *src)
{
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
*dst++ ^= *src++;
} Will you be able to fix that ASAP yourself, or would it be better if I open a PR for this fix? |
Also, @Alvin1Zhang, I can not reopen the issue because of the GitHub rules (I am not the person who closed it). Will you reopen it, or should I create another one and add a reference? |
@b1ackviking Ah, thanks. We'll have to take a more thorough look then and some more tests to root out all of these issues. Sorry for your inconvenience. |
Hi @ESP-Marius I'm wondering if v4.3 branch requires this fix or not. |
@AxelLin Yes, v4.3 will have the same issue, we are backporting it. This only seems to cause issues when using large PSRAMs though, so if you are not using this then you shouldn't see any issues. |
ok, thanks for the clarify. (I don't use PSRAM). |
@ESP-Marius |
@AxelLin Remaining fix (per #7236 (comment)) was recently added with 1cb07a1. We missed out on adding reference to this issue. Backport MRs combining both these fixes are already in final approval stage, they should appear on github in next few days. |
Did anyone find a solution for this problem, ı'm getting the same error at version 5.0 |
Environment
Problem Description
This commit (found with
git bisect
) defines the__cxx_eh_arena_size_get
function which is defined in$HOME/.espressif/tools/xtensa-esp32s2-elf/esp-2021r1-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/lib/no-rtti/libstdc++.a(eh_alloc.o)
.This is a violation of the One Definition Rule, and it causes a crash due to unaligned memory access in the
aes_ll_write_key
function when I use external SPI RAM (ESP-PSRAM64H).Reverting the commit fixes the bug.
Expected Behavior
Everything works.
Actual Behavior
The crash happens inside the
aes_ll_write_key
function during 1) WiFi initialization 2) establishing a secure network connection (with TLS).Steps to reproduce
sdkconfig.defaults
below)examples/protocols/mqtt/ssl_mutual_auth
(see also https://test.mosquitto.org/ssl/index.php)Code to reproduce this issue
The example located in
examples/protocols/mqtt/ssl_mutual_auth
.Debug Logs
NOTE: the line
I (24) boot: ESP-IDF v4.4-dev-1849-g8e3e65a47-dirty 2nd stage bootloader
saysdirty
because of the modifiedclient.key
andclient.crt
in the example. There are no other changes.Other items if possible
The
sdkconfig.defaults
file.The text was updated successfully, but these errors were encountered: