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

🐛 do not invalidate iterator in block collection #808

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

burgholzer
Copy link
Member

Description

This fixes a small bug observed as part of #803, which only surfaced on Windows in Debug mode when compiling using Clang 🤯
Part of the block collection code in the circuit optimizer would invalidate an iterator due to an update of the respective container being iterated over within the loop.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
@burgholzer burgholzer added fix Fix for something that isn't working Core Anything related to the Core library and IR c++ Anything related to C++ code labels Jan 21, 2025
@burgholzer burgholzer added this to the MQT Core milestone Jan 21, 2025
@burgholzer burgholzer self-assigned this Jan 21, 2025
@burgholzer burgholzer enabled auto-merge (squash) January 21, 2025 15:55
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.2%. Comparing base (bea8448) to head (89e2271).
Report is 19 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #808     +/-   ##
=======================================
+ Coverage   92.0%   92.2%   +0.1%     
=======================================
  Files        125     126      +1     
  Lines      13828   13827      -1     
  Branches    2153    2153             
=======================================
+ Hits       12735   12758     +23     
+ Misses      1093    1069     -24     
Flag Coverage Δ
cpp 92.0% <ø> (+0.1%) ⬆️
python 99.7% <ø> (ø)
Files with missing lines Coverage Δ
src/circuit_optimizer/CircuitOptimizer.cpp 90.6% <ø> (+0.1%) ⬆️

... and 23 files with indirect coverage changes

@burgholzer burgholzer merged commit cefedf2 into main Jan 21, 2025
30 checks passed
@burgholzer burgholzer deleted the fix-invalidated-iterator-use branch January 21, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code Core Anything related to the Core library and IR fix Fix for something that isn't working
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant