Skip to content
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

fix(riscv): building using Rust 1.73 to avoid segmentation fault in release mode #2785

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

reubenmiller
Copy link
Contributor

@reubenmiller reubenmiller commented Mar 16, 2024

Proposed changes

Build riscv64gc-unknown-linux-gnu target using minimum Rust 1.73, otherwise the produced binary crashes with a "segmentation fault".

Rust 1.73 upgraded the internal use of llvm to version 17 (which includes some other improvements) which

Rust versions 1.70 through to 1.76 were tested on a Star Vision2 device (with a riscv processor) - where "Segmentation fault" is observed whilst initialising the c8y-remote-access-plugin (though it is not limited to this command):

user@starfive:~$ uname -a
Linux starfive 5.15.0-starfive #1 SMP Fri Nov 24 07:22:28 UTC 2023 riscv64 GNU/Linux
user@starfive:~$ sudo -u tedge ./tedge-1.70 c8y-remote-access-plugin --init
Segmentation fault
user@starfive:~$ sudo -u tedge ./tedge-1.71 c8y-remote-access-plugin --init
Segmentation fault
user@starfive:~$ sudo -u tedge ./tedge-1.72 c8y-remote-access-plugin --init
Segmentation fault
user@starfive:~$ sudo -u tedge ./tedge-1.73 c8y-remote-access-plugin --init
user@starfive:~$ sudo -u tedge ./tedge-1.74 c8y-remote-access-plugin --init
user@starfive:~$ sudo -u tedge ./tedge-1.75 c8y-remote-access-plugin --init
user@starfive:~$ sudo -u tedge ./tedge-1.76 c8y-remote-access-plugin --init
user@starfive:~$ sudo -u tedge ./tedge-1.7 c8y-remote-access-plugin --init

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.1%. Comparing base (f756b91) to head (44abd79).
Report is 37 commits behind head on main.

Additional details and impacted files

see 54 files with indirect coverage changes

Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
389 0 3 389 100 0s

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@reubenmiller reubenmiller added this pull request to the merge queue Mar 16, 2024
Merged via the queue into thin-edge:main with commit adf7ed9 Mar 16, 2024
32 checks passed
@reubenmiller reubenmiller deleted the fix-riscv-libc-dep branch July 18, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants