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

[svdconv] Fix infinite recursion in SvdItem::GetEffectiveProtection() method #1793

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

ckudera
Copy link
Contributor

@ckudera ckudera commented Oct 4, 2024

This PR addresses an issue in the SvdItem::GetEffectiveProtection() method, which previously resulted in a segmentation fault (SIGSEGV) due to infinite recursion.

The previous implementation called GetEffectiveProtection() recursively within the for-loop, causing an infinite recursion if no protection value was found. This led to stack overflow and a crash. The solution replaces the recursive call with a call to GetProtection(), which checks the protection value without triggering recursion.

@ckudera ckudera changed the title Fix infinite recursion in SvdItem::GetEffectiveProtection() method [svdconv] Fix infinite recursion in SvdItem::GetEffectiveProtection() method Oct 4, 2024
@soumeh01 soumeh01 requested a review from JonatanAntoni October 7, 2024 05:28
@JonatanAntoni JonatanAntoni requested review from thorstendb-ARM and removed request for JonatanAntoni October 7, 2024 09:52
@brondani brondani merged commit d1fa6c5 into Open-CMSIS-Pack:main Nov 13, 2024
25 of 26 checks passed
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 64.91%. Comparing base (5fa61b5) to head (69f1c94).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tools/svdconv/SVDModel/src/SvdItem.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1793      +/-   ##
==========================================
- Coverage   64.92%   64.91%   -0.01%     
==========================================
  Files         163      163              
  Lines       34453    34454       +1     
  Branches    19975    19975              
==========================================
  Hits        22367    22367              
- Misses       7928     7933       +5     
+ Partials     4158     4154       -4     
Flag Coverage Δ
svdconv-cov 40.24% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tools/svdconv/SVDModel/src/SvdItem.cpp 54.77% <0.00%> (ø)

... and 3 files with indirect coverage changes

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.

3 participants