FreeRTOS-Kernel/FreeRTOS
Gaurav-Aggarwal-AWS 1e8d541ed4
Fix stack smashing in POSIX Demo (#901)
The tracelyzer code was declaring a local stack variable of type
`uint32_t` and passing it as output parameter to a function which
expected `uint64_t` on a 64-bit platform. This resulted in 4 byte memory
corruption. The problem was that the function signature uses
`TraceUnsignedBaseType_t` type for the output parameter which gets
defined to `uint32_t` on a 32-bit platform and to `uint64_t` on a 64-bit
platform, while the local stack variable was declared as `uint32_t`.
This commit changes the type of local stack variable to
`TraceUnsignedBaseType_t` to match the function parameter type.

Tracelyzer creates a task internally stack size of which is controlled
using TRC_CFG_CTRL_TASK_STACK_SIZE. It was earlier defined to 1024.
The POSIX port requires the stack size to be minimum PTHREAD_STACK_MIN.
The commit updates the TRC_CFG_CTRL_TASK_STACK_SIZE to
PTHREAD_STACK_MIN.

The demo directory contained one extra trcConfig.h and
trcKernelPortConfig.h. This commit deletes those files.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2022-12-15 19:21:55 +05:30
..
Demo Fix stack smashing in POSIX Demo (#901) 2022-12-15 19:21:55 +05:30
License Update version number in readiness for V10.3.0 release. Sync SVN with reviewed release candidate. 2020-02-07 20:14:50 +00:00
Source@def7d2df2b FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) 2022-11-29 14:21:09 -08:00
Test [AUTO][RELEASE]: Bump file header version to "202212.00" 2022-12-10 01:17:30 +00:00
links_to_doc_pages_for_the_demo_projects.url Microblaze: Add a port optimised task selection implementation to the Microblaze port. 2015-06-24 15:10:03 +00:00
README.md Add uncrustify github workflow (#659) 2021-07-22 14:23:48 -07:00

Directories:

  • The FreeRTOS/Source directory contains the FreeRTOS source code, and contains its own readme file.

  • The FreeRTOS/Demo directory contains a demo application for every official FreeRTOS port, and contains its own readme file.

  • The FreeRTOS/Test directory contains the tests performed on common code and the portable layer code, and contains its own readme file.

See FreeRTOS/SourceOrganization for full details of the directory structure and information on locating the files you require.

The easiest way to use FreeRTOS is to start with one of the pre-configured demo application projects (found in the FreeRTOS/Demo directory). That way you will have the correct FreeRTOS source files included, and the correct include paths configured. Once a demo application is building and executing you can remove the demo application file, and start to add in your own application source files.

See also -