Skip to content

inconsistent use of assert #21038

@vrabaud

Description

@vrabaud
System information (version)
  • OpenCV => 4.5.4
  • Operating System / Platform => Linux
  • Compiler => clang 12
Detailed description

There are 243 instances of assert in the code (not in tests nor 3rd_party) while CV_Assert should probably be used:

find ./modules -name 'test' -prune -o -type f -print | xargs grep " assert\( \)*(" | wc -l

Should indeed CV_Assert be used ? Or is there a reason for using assert (performance maybe).

This triggers invalid bugs in fuzzers that expect normal errors to be handled though a proper CV_Assert.

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions