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

Fix 'cannot seek vector iterator' in debug windows build #1543

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

antoszy
Copy link
Contributor

@antoszy antoszy commented Dec 15, 2022

Motivation

Fixes: #1537

Modification

Adding nbInputs to the mFeatmapStrides.begin() iterator cases it to go out of range of the mFeatmapStrides vector. When this is compiled in debug build in MS compiler, it causes an exception. If we decrement the value first and then add it to iterator, than the iterator stays in correct vector range.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

Signed-off-by: Michal Antoszkiewicz <mantoszkiewicz@codeflyers.com>
@CLAassistant
Copy link

CLAassistant commented Dec 15, 2022

CLA assistant check
All committers have signed the CLA.

@lvhan028 lvhan028 requested a review from irexyc December 15, 2022 15:25
Copy link
Collaborator

@lvhan028 lvhan028 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lvhan028
Copy link
Collaborator

@antoszy could you also open a PR to master branch?

@lvhan028 lvhan028 merged commit 6d376af into open-mmlab:dev-1.x Dec 16, 2022
@antoszy antoszy deleted the prv-antoszy-fix-win-debug branch December 19, 2022 17:15
lvhan028 pushed a commit that referenced this pull request Mar 1, 2023
Signed-off-by: Michal Antoszkiewicz <mantoszkiewicz@codeflyers.com>

Signed-off-by: Michal Antoszkiewicz <mantoszkiewicz@codeflyers.com>
@openmmlab-bot
Copy link
Collaborator

antoszy ,您好!您在MMDeploy项目中给我们提的PR非常重要,感谢您付出私人时间帮助改进开源项目,相信很多开发者会从你的PR中受益。
我们非常期待与您继续合作,OpenMMLab专门成立了贡献者组织MMSIG,为贡献者们提供开源证书、荣誉体系和专享好礼,可通过添加微信:openmmlabwx 联系我们(请备注mmsig+GitHub id),由衷希望您能加入!
Dear antoszy ,
First of all, we want to express our gratitude for your significant PR in the MMDeploy project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.
We are looking forward to continuing our collaboration with you. OpenMMLab has established a special contributors' organization called MMSIG, which provides contributors with open-source certificates, a recognition system, and exclusive rewards. You can contact us by adding our WeChat(if you have WeChat): openmmlabwx, or join in our discord:https://discord.gg/raweFPmdzG. We sincerely hope you will join us!
Best regards! @antoszy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants