-
Notifications
You must be signed in to change notification settings - Fork 56
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 crash when same pack is located on 2 paths #1063
Fix crash when same pack is located on 2 paths #1063
Conversation
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.
@Torbjorn-Svensson Thanks for this finding and contribution.
Please see my suggestion below and also add or extended a test case to cover the new code.
Scenario: csolution.yml: packs: - pack: ARM::[email protected] path: ./ARM.CMSIS.5.9.0/ cproject.yml: packs: - pack: [email protected] In the above scenario, the same pack is defined on 2 different paths. The one in the csolution.yml is a project local path, and for the cproject.yml, it can be found in the $CMSIS_PACK_ROOT. As the RteModel does not allow "duplicates", the RtePackage pointer, for the second pdsc file to be loaded, will be released when calling RteModel->Validate() and thus, only instances that is known by the model should be contained in m_loadedPacks in the ProjMgrWorker instance. Contributed by STMicroelectronics Signed-off-by: Torbjörn SVENSSON <[email protected]> Co-authored-by: Daniel Brondani <[email protected]>
c9918a4
to
3eda6d6
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1063 +/- ##
==========================================
- Coverage 54.61% 54.61% -0.01%
==========================================
Files 116 116
Lines 22703 22701 -2
Branches 12607 12608 +1
==========================================
- Hits 12400 12398 -2
Misses 8148 8148
Partials 2155 2155
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Scenario:
csolution.yml:
cproject.yml:
In the above scenario, the same pack is defined on 2 different paths. The one in the csolution.yml is a project local path, and for the cproject.yml, it can be found in the $CMSIS_PACK_ROOT.
As the RteModel does not allow "duplicates", the RtePackage pointer, for the second pdsc file to be loaded, will be released when calling RteModel->Validate() and thus, only instances that is known by the model should be contained in m_loadedPacks in the ProjMgrWorker instance.
Contributed by STMicroelectronics