Unverified Commit cfc91804 authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Fix memory corruption introducted in FreeRTOS port (#556)

To remove compiler warning the valid core macro was modified to only check
that the core passed in was < # of total cores.  Unfortunately there are
parts of the FreeRTOS code where the passed in core # is -1.  The upstream
catches this and returns FALSE, but my hacked version returned TRUE.  This
caused interesting memory corruption errors and crashes when the
current task block[-1] was updated.

Undo the change and fix the 1 spot where a warning happens instead.

Undo the forced compiler -O0 for port.c, it was only masking the fault.
parent 88d213a3
Subproject commit 1af47324849c0ac62202554f2879f2656187e834
Subproject commit f3612388755827dbc3ac48f40764045f4897986f
// Port.c seems to leave interrupts disabled occasionally when built w/anything other than -O0
#pragma GCC optimize ("O0")
#include "../lib/FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040/port.c"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment