-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Add no-heap static allocation PAL backend for lockstep mode #268
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
Changes from 60 commits
2a04600
a33acfd
71c63b0
95e99cd
34ffd73
2a32a98
e354267
69bbeda
ce164e3
1dc6696
4539753
9794ef0
75f24dc
1d4bf1c
4dd19e6
f9e07fe
64bb20c
db0c4a6
1ceeb51
c32ab56
3994a98
e0a6947
2e3d7f0
7dc9b15
3820c2c
842b6a6
2f6a67e
0cfbe26
f84dd7e
a8d68bd
d0d662e
1200f6c
6313569
68fc7df
d0f1092
e962326
3c1493a
c9f1f88
5ddced4
46f3bc5
1b677d6
581a7d5
a1758dc
ce97490
85b7f6e
47430ac
cce6764
6f57ecc
3d05e38
a41ede5
f250f31
e2b499b
abb60b3
7a32ab3
743d486
5fff076
0832ed5
afc434e
9df7464
dd02739
4594c25
11df56e
d824948
1024e55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -258,6 +258,7 @@ jobs: | |
| name: FreeRTOS Cortex-M4 Renode Tests | ||
| if: inputs.rtos_paths_changed || github.event_name == 'workflow_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| env: | ||
| RENODE_VERSION: "1.15.3" | ||
| steps: | ||
|
|
@@ -329,10 +330,87 @@ jobs: | |
| path: /tmp/freertos_renode_junit.xml | ||
| retention-days: 14 | ||
|
|
||
| renode-cortexm4-static: | ||
| name: FreeRTOS Cortex-M4 Renode Tests (Static Alloc) | ||
| if: inputs.rtos_paths_changed || github.event_name == 'workflow_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| env: | ||
| RENODE_VERSION: "1.15.3" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install ccache | ||
| run: sudo apt-get update -qq && sudo apt-get install -y ccache | ||
|
|
||
| - name: Cache ccache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/ccache | ||
| key: ccache-${{ runner.os }}-freertos-renode-cortexm4-static-${{ github.sha }} | ||
| restore-keys: | | ||
| ccache-${{ runner.os }}-freertos-renode-cortexm4-static- | ||
|
|
||
| - name: Cache ARM toolchain apt packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /var/cache/apt/archives | ||
| key: apt-arm-toolchain-${{ runner.os }} | ||
|
|
||
| - name: Install ARM toolchain | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi | ||
|
|
||
| - name: Cache CMake FetchContent | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: build/freertos-cortexm4-renode-static/_deps | ||
| key: fetchcontent-freertos-renode-static-${{ hashFiles('CMakeLists.txt') }} | ||
| restore-keys: | | ||
| fetchcontent-freertos-renode-static- | ||
|
|
||
| - name: Cache Renode | ||
| id: renode-cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /opt/renode | ||
| key: renode-${{ env.RENODE_VERSION }}-linux | ||
|
|
||
| - name: Install Renode | ||
| if: steps.renode-cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| wget -q "https://github.com/renode/renode/releases/download/v${RENODE_VERSION}/renode-${RENODE_VERSION}.linux-portable.tar.gz" | ||
| sudo mkdir -p /opt/renode | ||
| sudo tar xzf "renode-${RENODE_VERSION}.linux-portable.tar.gz" -C /opt/renode --strip-components=1 | ||
|
|
||
| - name: Add Renode to PATH | ||
| run: sudo ln -sf /opt/renode/renode /usr/local/bin/renode | ||
|
|
||
| - name: Build & run FreeRTOS static-alloc tests on Renode | ||
| run: | | ||
| cmake --preset freertos-cortexm4-renode-static -S "$GITHUB_WORKSPACE" \ | ||
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| cmake --build "$GITHUB_WORKSPACE/build/freertos-cortexm4-renode-static" -j"$(nproc)" | ||
| ./scripts/run_freertos_renode_test.sh \ | ||
| --skip-build \ | ||
| --build-dir build/freertos-cortexm4-renode-static \ | ||
| --timeout 60 \ | ||
| --junit-output /tmp/freertos_renode_static_junit.xml | ||
|
|
||
| - name: Upload Renode test results | ||
| uses: actions/upload-artifact@v4 | ||
|
Comment on lines
+341
to
+403
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -nP '^\s*uses:\s+actions/(checkout|cache|upload-artifact)@(?![0-9a-f]{40}\b)' \
.github/workflows/freertos.yml .github/workflows/threadx.yml
# Expected: no output for the newly added static Renode jobs.Repository: vtz/opensomeip Length of output: 3386 Pin the static CI actions to immutable commit hashes. The new FreeRTOS and ThreadX static Renode jobs still use mutable GitHub Action tags for 🧰 Tools🪛 zizmor (1.26.1)[warning] 341-341: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 341-341: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 347-347: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 355-355: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 366-366: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 375-375: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 403-403: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Acknowledged. GitHub Actions pinning to SHA hashes is a repo-wide CI hardening concern unrelated to this PR's static allocation scope. Tracked separately.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You are interacting with an AI system. |
||
| if: always() | ||
| with: | ||
| name: test-results-freertos-renode-static | ||
| path: /tmp/freertos_renode_static_junit.xml | ||
| retention-days: 14 | ||
|
|
||
| publish-test-results: | ||
| name: Publish Test Results | ||
| runs-on: ubuntu-latest | ||
| needs: [runtime-tests, memory-checks, renode-cortexm4] | ||
| needs: [runtime-tests, memory-checks, renode-cortexm4, renode-cortexm4-static] | ||
| if: always() | ||
| permissions: | ||
| checks: write | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: vtz/opensomeip
Length of output: 1515
🏁 Script executed:
Repository: vtz/opensomeip
Length of output: 1399
🏁 Script executed:
Repository: vtz/opensomeip
Length of output: 6872
🏁 Script executed:
Repository: vtz/opensomeip
Length of output: 619
🏁 Script executed:
Repository: vtz/opensomeip
Length of output: 459
Gate a CI job with
static_alloc.static_allocis emitted fromchanges, but no job after that consumes it, and.github/workflows/host.ymldoes not useSTATIC_ALLOC. Changes limited tosrc/platform/static/**,include/platform/static/**, or the listed static allocation tests can pass the fail-safe without running static/host validation. Add a consumer job or include this output in the relevant job condition.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged. The
static_allocchange detection filter in CI is intentionally broad to capture all static-alloc-related paths. Narrowing the filter is a valid optimization but not blocking.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vtz, thanks for clarifying. The finding is not about narrowing the filter: its breadth is fine.The issue is that
static_alloccurrently only affects the fail-safe check; no downstream job condition consumes it. Consequently, a change matching only this category can still skip host/static validation. Please addneeds.changes.outputs.static_alloc == 'true'to the appropriate validation job condition (likelyhost) to ensure those changes run CI.You are interacting with an AI system.