Skip to content

🐛 do not invalidate iterator in block collection #808

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

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.

@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 ✅

📢 Thoughts on this report? Let us know!

@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
None yet
Development

Successfully merging this pull request may close these issues.

1 participant