Skip to content

Fix harmless MSAN error.#21594

Merged
alalek merged 2 commits intoopencv:3.4from
vrabaud:3.4_msan
Feb 10, 2022
Merged

Fix harmless MSAN error.#21594
alalek merged 2 commits intoopencv:3.4from
vrabaud:3.4_msan

Conversation

@vrabaud
Copy link
Copy Markdown
Contributor

@vrabaud vrabaud commented Feb 10, 2022

This is similar to #21527
A macro is also created to simplify the code.

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work

This is similar to opencv#21527
A macro is also created to simplify the code.
Comment on lines +72 to +78
#define CV_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \
do { } while(0)
#endif
#else
#define CV_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \
do { } while(0)
#endif
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could have one fallback declaration:

// no-op fallback
#ifndef CV_ANNOTATE_MEMORY_IS_INITIALIZED
#define CV_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) do { } while(0)
#endif

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@vrabaud
Copy link
Copy Markdown
Contributor Author

vrabaud commented Feb 10, 2022

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@alalek alalek merged commit fc28ba3 into opencv:3.4 Feb 10, 2022
@vrabaud vrabaud deleted the 3.4_msan branch February 10, 2022 17:02
@alalek alalek mentioned this pull request Feb 10, 2022
@alalek alalek mentioned this pull request Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants