-
Notifications
You must be signed in to change notification settings - Fork 139
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 signal name assignment bug in names_view.hpp
#638
Conversation
… before accessing its elements.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #638 +/- ##
=======================================
Coverage 83.47% 83.47%
=======================================
Files 187 187
Lines 29692 29703 +11
=======================================
+ Hits 24784 24795 +11
Misses 4908 4908 ☔ View full report in Codecov by Sentry. |
Thanks!
Please allow me some more time to think about it more thoroughly. If you have any thoughts (e.g. from your usage scenario), please do let me know! |
Thanks @lee30sonia for your helpful feedback! The situation is as follows: For a few months now, we have been getting an error in the PR (https://github.com/cda-tum/fiction/actions/runs/8452568703/job/23153203895?pr=317) in debug on Windows only. So I built everything on a Windows machine and investigated why the problem occurs in the CI. It turned out that windows in debug fails because of |
@Drewniok That's weird. It would be interesting to know how the test case that triggers the bug looks like. e.g., having a print-out in the assignment operator printing how many PIs |
@lee30sonia The bug seems to manifest itself when updating a |
Hi @lee30sonia, |
Hi @Drewniok, sorry, I am on in-between-jobs vacation these weeks and don't have much time. This PR is on my TODO list and I promise to get back as soon as possible. |
Sorry for the delay and thanks again for the contribution! It looks good to me. I pushed just some minor changes and will merge once the tests are complete. |
This PR addresses a bug related to signal name assignment within the
names_view<Ntk>::operator=
method. The code has been refactored to include a check for the emptiness of thecurrent_pis
vector before attempting to access its elements. This change ensures that the loop is only executed when thecurrent_pis
vector is not empty, preventing potential out-of-range accesses and improving code safety.