Skip to content

Fix infer issues - USE_AFTER_DELETE #91

@eljonny

Description

@eljonny

"I'm 99.9% sure this is a false positive."

Definitely not a false positive, and pointed out 2 other instances of the issue.

src/TestCPPTestCase.cpp:203: error: Use After Delete
  call to `std::unique_ptr::operator=()` eventually accesses `TestCPP::Util::no_destroy::get().__infer_backing_pointer` that was invalidated by `delete` on line 202.
  201.                 cout.rdbuf(TestCase::stdoutOriginal.get().release());
  202.                 delete TestCase::stdoutBuffer.get().get();
  203.                 TestCase::stdoutBuffer.get() = nullptr;
                       ^
  204.             }
  205.

Metadata

Metadata

Assignees

Labels

static-analysisAn issue related to a static analysis resulttest-caseRelating to TestCPP TestCase

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions