Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.
This repository was archived by the owner on Nov 15, 2021. It is now read-only.

FYI : Static analysis at commit 3ede247ad7 shows some minor issues #242

@SteveGilham

Description

@SteveGilham

I got a chance to do a static analysis run of a recent master; and setting aside the reports that are in tests, in system header files, are clearly false positives, or indicate that something has already gone horribly wrong (such as bad inputs) and all that could be done is emit more diagnostics as we terminate; we are left with the following:

  • Access in ProfilerManager.cs to MemoryManger._blocks is not guarded by the lock used to guard all the other accesses (GetBlocks could take a predicate and return a reified list from a lock clause)
  • MemoryManager.Initialise() could double-checked lock to consistently guard the initialised fields
  • ProfilerManager.StartProcessingThread() could call threadActivated.Dispose() before exiting to release the system handle
  • ProfilerManager.RunProcess() could call queueMgmt.Dispose() before exiting to release the system handle
  • ProfilerManager.RunProcess() could call environmentKeyRead.Dispose() before exiting to release the system handle
  • CCodeCoverage::Initialize() local nCount written but not read
  • Method::GetInstructionAtOffset(5 args) last argument is always true (bitwise & with zero constant)
  • Method::InsertInstructionsAtOffset() local actualOffset written but not read
  • Method::EndOfBranch sets next->m_jump then checks next against NULL

and about half of those are primarily aesthetic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions