FreeRTOS-Kernel/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace
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
..
config Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
extras/TraceRecorderInit Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
Include Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
streamports Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
LICENSE.md Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
LICENSE.spdx Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
README.md Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
ReadMe.url Add FreeRTOS-Plus directory with new directory structure so it matches the FreeRTOS directory. 2013-04-18 09:17:05 +00:00
trcAssert.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcCounter.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcDiagnostics.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcEntryTable.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcError.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcEvent.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcEventBuffer.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcExtension.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcHardwarePort.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcHeap.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcInternalEventBuffer.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcInterval.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcISR.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcKernelPort.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcMultiCoreEventBuffer.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcObject.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcPrint.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcSnapshotRecorder.c Fix stack smashing in POSIX Demo (#901) 2022-12-15 19:21:55 +05:30
trcStackMonitor.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcStateMachine.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcStaticBuffer.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcStreamingRecorder.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcString.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcTask.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00
trcTimestamp.c Percepio Trace Recorder v4.6.0 (#789) 2022-11-03 13:58:38 -07:00

Trace Recorder source code for use with Percepio's Tracealyzer.

Read more at https://percepio.com/tracealyzer/ and https://percepio.com/gettingstarted.

Repository at https://github.com/percepio/TraceRecorderSource