To get a trial key
fill out the form below
Team License (standard version)
Enterprise License (extended version)
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
GBP
RUB
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
Examples of errors detected by the V607…

Examples of errors detected by the V607 diagnostic

April 5, 2021

V607. Ownerless expression 'Foo'.


IPP Samples

V607 Ownerless expression 'state->com.m_channel_number'. aac_dec aac_dec_api_fp.c 1404


AACStatus bsacdecSetNumChannels(Ipp32s channelConfiguration,
                                AACDec *state)
{
  state->com.m_channel_number = channelConfiguration;
  if (channelConfiguration == 7) {
    state->com.m_channel_number;    // <=
  }

  return AAC_OK;
}

Trans-Proteomic Pipeline

V607 Ownerless expression '* iLenSeq'. Comet_fastadb comet-fastadb1.cxx 2241


void TRANSLATE(int iFrame,
      char *szNewSeq,
      char *szSeq,
      int  *iLenSeq)
{
  ....
  *iLenSeq;
}

Windows 8 Driver Samples

V607 Ownerless expression 'pDevExt->WdfDevice'. uart16550pc.cpp 58


NTSTATUS
UartInitContext(_In_ WDFDEVICE Device)
{
  ....
  pDevExt->WdfDevice;
  ....
}

TortoiseSVN

V607 Ownerless expression 'app.hwndTT'. tortoiseblame.cpp 1782


BOOL InitInstance(HINSTANCE hResource, int nCmdShow)
{
  ....
  app.hwndTT; // handle to the ToolTip control
  ....
}

Boost (C++ libraries)

V607 Ownerless expression 'duration_style_ == style'. base_formatter.hpp 51


void set_duration_style(duration_style style)
{
  duration_style_ == style;
}

Trans-Proteomic Pipeline

V607 Ownerless expression 'done_[charge]'. mixturemodel.cxx 1558


Boolean MixtureModel::iterate(int counter) {
  ....
  if (done_[charge] < 0) {
    done_[charge];
  }
  else if (priors_[charge] > 0.0) {
    done_[charge] += extraitrs_;
  }
  ....
}

CryEngine 3 SDK

V607 Ownerless expression 'insertResult.first->second.m_entityId'. persistantstats.cpp 4814


CPersistantStats::SEnemyTeamMemberInfo *
CPersistantStats::GetEnemyTeamMemberInfo(EntityId inEntityId)
{
  ....
  insertResult.first->second.m_entityId;
  ....
}

Similar errors can be found in some other places:

  • V607 Ownerless expression 'initialState.weapon.weaponId'. recordingsystem.cpp 2671

Eigen

V607 Ownerless expression 'v1[0]'. miscmatrices.cpp 28


template<typename MatrixType> void miscMatrices(
  const MatrixType& m)
{
  ....
  VectorType v1 = VectorType::Random(rows);
  v1[0];
  ....
}

Unreal Engine 4

V607 Ownerless expression 'NumByteProperties'. codegenerator.cpp 633


void FNativeClassHeaderGenerator::ExportProperties(....)
{
  ....
  int32 NumByteProperties = 0;
  ....
  if (bIsByteProperty)
  {
    NumByteProperties;
  }
  ....
}

Miranda NG

V607 Ownerless expression 'ccs->wParam'. MirOTR svcs_proto.cpp 103


INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){
  ....
  CCSDATA *ccs = (CCSDATA *) lParam;
  ....
  if (otr_context_get_trust(context) >= TRUST_UNVERIFIED)
    ccs->wParam;
  ....
}

Similar errors can be found in some other places:

  • V607 Ownerless expression 'm_hDDIcon'. HistoryStats bandctrlimpl.cpp 226

Godot Engine

V607 Ownerless expression 'm_angularLimits[p_axis].m_limitSoftness'. generic_6dof_joint_sw.cpp 539


void Generic6DOFJointSW::set_param(....)
{
  ERR_FAIL_INDEX(p_axis,3);
  switch(p_param)
  {
    case PhysicsServer::G6DOF_JOINT_LINEAR_LOWER_LIMIT:
    {
      m_linearLimits.m_lowerLimit[p_axis]=p_value;
    } break;
    case PhysicsServer::G6DOF_JOINT_LINEAR_UPPER_LIMIT:
    {
      m_linearLimits.m_upperLimit[p_axis]=p_value;
    } break;
    ....
    case PhysicsServer::G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS:
    {
      m_angularLimits[p_axis].m_limitSoftness;  // <=
    } break;
    case PhysicsServer::G6DOF_JOINT_ANGULAR_DAMPING:
    {
      m_angularLimits[p_axis].m_damping=p_value;
    } break;
    ....
  }
}

Godot Engine

V607 Ownerless expression 'ie.action.pressed'. variant_op.cpp 2410


Variant Variant::get(const Variant& p_index, bool *r_valid) const
{
  ....
  if (ie.type == InputEvent::ACTION)
  {
    if (str =="action")
    {
      valid=true;
      return ie.action.action;
    }
    else if (str == "pressed")
    {
      valid=true;
      ie.action.pressed;  // <=
    }
  }
  ....
}

Serious Engine 1 v.1.10

V607 Ownerless expression 'pdecDLLClass->dec_ctProperties'. entityproperties.cpp 107


void CEntity::ReadProperties_t(CTStream &istrm) // throw char *
{
  ....
  CDLLEntityClass *pdecDLLClass = en_pecClass->ec_pdecDLLClass;
  ....
  // for all saved properties
  for(INDEX iProperty=0; iProperty<ctProperties; iProperty++) {
    pdecDLLClass->dec_ctProperties;  // <=
    ....
  }
  ....
}

System Shock

V607 Ownerless expression 'i > 0'. TMAP.C 221


int do_tmap_tile(....)
{
  ....
  for (i=nverts; i--; i>0)
  {
    ....
  }
  ....
}

System Shock

V607 Ownerless expression 'i >= 0'. INTERP.C 366


void g3_interpret_object(....)
{
  for (i=N_RES_POINTS-1; i--; i>=0)
  {
    ....;
  }
  ....
}

Similar errors can be found in some other places:

  • V607 Ownerless expression 'i > 0'. TMAP.C 532
  • V607 Ownerless expression 'i > 0'. POLYGON.C 77
  • V607 Ownerless expression 'i > 0'. POLYGON.C 268

Azure Service Fabric

V607 CWE-482 Ownerless expression. EnvironmentOverrideDescription.cpp 60


bool EnvironmentOverridesDescription::operator == (....) const
{
  bool equals = true;
  for (auto i = 0; i < EnvironmentVariables.size(); i++)
  {
    equals = EnvironmentVariables[i] ==
             other.EnvironmentVariables[i];
    if (!equals) { return equals; }
  }
  this->CodePackageRef == other.CodePackageRef; // <=
  if (!equals) { return equals; }
  return equals;
}
equals = this->CodePackageRef == other.CodePackageRef;
if (!equals) { return equals; }

Popular related articles
How PVS-Studio Proved to Be More Attentive Than Three and a Half Programmers

Date: 10.22.2018

Author: Andrey Karpov

Just like other static analyzers, PVS-Studio often produces false positives. What you are about to read is a short story where I'll tell you how PVS-Studio proved, just one more time, to be more atte…
Characteristics of PVS-Studio Analyzer by the Example of EFL Core Libraries, 10-15% of False Positives

Date: 07.31.2017

Author: Andrey Karpov

After I wrote quite a big article about the analysis of the Tizen OS code, I received a large number of questions concerning the percentage of false positives and the density of errors (how many erro…
The Ultimate Question of Programming, Refactoring, and Everything

Date: 04.14.2016

Author: Andrey Karpov

Yes, you've guessed correctly - the answer is "42". In this article you will find 42 recommendations about coding in C++ that can help a programmer avoid a lot of errors, save time and effort. The au…
PVS-Studio for Java

Date: 01.17.2019

Author: Andrey Karpov

In the seventh version of the PVS-Studio static analyzer, we added support of the Java language. It's time for a brief story of how we've started making support of the Java language, how far we've co…
The Evil within the Comparison Functions

Date: 05.19.2017

Author: Andrey Karpov

Perhaps, readers remember my article titled "Last line effect". It describes a pattern I've once noticed: in most cases programmers make an error in the last line of similar text blocks. Now I want t…
Technologies used in the PVS-Studio code analyzer for finding bugs and potential vulnerabilities

Date: 11.21.2018

Author: Andrey Karpov

A brief description of technologies used in the PVS-Studio tool, which let us effectively detect a large number of error patterns and potential vulnerabilities. The article describes the implementati…
Appreciate Static Code Analysis!

Date: 10.16.2017

Author: Andrey Karpov

I am really astonished by the capabilities of static code analysis even though I am one of the developers of PVS-Studio analyzer myself. The tool surprised me the other day as it turned out to be sma…
The way static analyzers fight against false positives, and why they do it

Date: 03.20.2017

Author: Andrey Karpov

In my previous article I wrote that I don't like the approach of evaluating the efficiency of static analyzers with the help of synthetic tests. In that article, I give the example of a code fragment…
The Last Line Effect

Date: 05.31.2014

Author: Andrey Karpov

I have studied many errors caused by the use of the Copy-Paste method, and can assure you that programmers most often tend to make mistakes in the last fragment of a homogeneous code block. I have ne…
Static analysis as part of the development process in Unreal Engine

Date: 06.27.2017

Author: Andrey Karpov

Unreal Engine continues to develop as new code is added and previously written code is changed. What is the inevitable consequence of ongoing development in a project? The emergence of new bugs in th…

Comments (0)

Next comments

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →
Accept