PVS-StudioWarnings

PVS-Studio warning V595 for Firefox

Nov 12th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. CompileStatus
  2. mjit::Compiler::performCompilation(JITScript **jitp)
  3. {
  4.   ...
  5.   JaegerSpew(JSpew_Scripts,
  6.     "successfully compiled (code \"%p\") (size \"%u\")\n",
  7.     (*jitp)->code.m_code.executableAddress(),
  8.       unsigned((*jitp)->code.m_size));
  9.  
  10.   if (!*jitp)
  11.       return Compile_Abort;
  12.   ...
  13. }
  14.  
  15. This suspicious code was found in Firefox project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V595 The '* jitp' pointer was utilized before it was verified against nullptr. Check lines: 547, 549. compiler.cpp 547
  18.  
  19. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment