svf-tools 1.0.1087 → 1.0.1088

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/package.json +1 -1
  2. package/svf/lib/AE/Svfexe/AEDetector.cpp +16 -17
  3. package/svf/lib/AE/Svfexe/AbsExtAPI.cpp +2 -1
  4. package/SVF-doxygen/doxygen.config +0 -2548
  5. package/SVF-doxygen/wiki/PAG.png +0 -0
  6. package/SVF-doxygen/wiki/andersen.png +0 -0
  7. package/SVF-doxygen/wiki/callgraph.png +0 -0
  8. package/SVF-doxygen/wiki/consG.png +0 -0
  9. package/SVF-doxygen/wiki/cpu2000-flto +0 -432
  10. package/SVF-doxygen/wiki/cpu2006-flto +0 -417
  11. package/SVF-doxygen/wiki/cpu2017-wllvm.cfg +0 -999
  12. package/SVF-doxygen/wiki/database.png +0 -0
  13. package/SVF-doxygen/wiki/framework.png +0 -0
  14. package/SVF-doxygen/wiki/help.png +0 -0
  15. package/SVF-doxygen/wiki/icfg.png +0 -0
  16. package/SVF-doxygen/wiki/mssa-cha.png +0 -0
  17. package/SVF-doxygen/wiki/pagedge.png +0 -0
  18. package/SVF-doxygen/wiki/pagnode.png +0 -0
  19. package/SVF-doxygen/wiki/pt.png +0 -0
  20. package/SVF-doxygen/wiki/setupcmake.png +0 -0
  21. package/SVF-doxygen/wiki/setupconfiguration.png +0 -0
  22. package/SVF-doxygen/wiki/setupdashboard.png +0 -0
  23. package/SVF-doxygen/wiki/setupdebug.png +0 -0
  24. package/SVF-doxygen/wiki/setupenv.png +0 -0
  25. package/SVF-doxygen/wiki/startup.png +0 -0
  26. package/SVF-doxygen/wiki/svf-stat.pdf +0 -0
  27. package/SVF-doxygen/wiki/svfg-framework.png +0 -0
  28. package/SVF-doxygen/wiki/svfg.png +0 -0
  29. package/SVF-doxygen/wiki/svfg_opt.png +0 -0
  30. package/SVF-doxygen/wiki/svfgedge-cha.png +0 -0
  31. package/SVF-doxygen/wiki/svfgnode-cha.png +0 -0
  32. package/SVF-doxygen/wiki/svfpic/README.md +0 -6
  33. package/SVF-doxygen/wiki/svfpic/ass-1debug1.png +0 -0
  34. package/SVF-doxygen/wiki/svfpic/ass-1debug2.png +0 -0
  35. package/SVF-doxygen/wiki/svfpic/build.jpg +0 -0
  36. package/SVF-doxygen/wiki/svfpic/cmd.png +0 -0
  37. package/SVF-doxygen/wiki/svfpic/connect1.jpg +0 -0
  38. package/SVF-doxygen/wiki/svfpic/connect2.png +0 -0
  39. package/SVF-doxygen/wiki/svfpic/connect3.png +0 -0
  40. package/SVF-doxygen/wiki/svfpic/connect4.jpg +0 -0
  41. package/SVF-doxygen/wiki/svfpic/connect5.jpg +0 -0
  42. package/SVF-doxygen/wiki/svfpic/connect6.png +0 -0
  43. package/SVF-doxygen/wiki/svfpic/connect7.jpg +0 -0
  44. package/SVF-doxygen/wiki/svfpic/continue.png +0 -0
  45. package/SVF-doxygen/wiki/svfpic/debug-new.png +0 -0
  46. package/SVF-doxygen/wiki/svfpic/debug-new2.png +0 -0
  47. package/SVF-doxygen/wiki/svfpic/debug1.jpeg +0 -0
  48. package/SVF-doxygen/wiki/svfpic/debug2.jpeg +0 -0
  49. package/SVF-doxygen/wiki/svfpic/debug3.png +0 -0
  50. package/SVF-doxygen/wiki/svfpic/debug4.png +0 -0
  51. package/SVF-doxygen/wiki/svfpic/debug5.jpeg +0 -0
  52. package/SVF-doxygen/wiki/svfpic/debug6.jpeg +0 -0
  53. package/SVF-doxygen/wiki/svfpic/docker_sys_requirement.png +0 -0
  54. package/SVF-doxygen/wiki/svfpic/docker_sys_requirements.png +0 -0
  55. package/SVF-doxygen/wiki/svfpic/dockerbuild.png +0 -0
  56. package/SVF-doxygen/wiki/svfpic/dockerbuild2.jpg +0 -0
  57. package/SVF-doxygen/wiki/svfpic/dockerbuild3.jpg +0 -0
  58. package/SVF-doxygen/wiki/svfpic/dockerbuild4.png +0 -0
  59. package/SVF-doxygen/wiki/svfpic/dockerbuild5.jpg +0 -0
  60. package/SVF-doxygen/wiki/svfpic/dockerbuildimage.png +0 -0
  61. package/SVF-doxygen/wiki/svfpic/dockercmd.png +0 -0
  62. package/SVF-doxygen/wiki/svfpic/dockercmd2.png +0 -0
  63. package/SVF-doxygen/wiki/svfpic/dockercontainer.png +0 -0
  64. package/SVF-doxygen/wiki/svfpic/dockerdb1.jpg +0 -0
  65. package/SVF-doxygen/wiki/svfpic/dockerdb10.jpeg +0 -0
  66. package/SVF-doxygen/wiki/svfpic/dockerdb2.jpg +0 -0
  67. package/SVF-doxygen/wiki/svfpic/dockerdb3.jpg +0 -0
  68. package/SVF-doxygen/wiki/svfpic/dockerdb4.jpg +0 -0
  69. package/SVF-doxygen/wiki/svfpic/dockerdb5.png +0 -0
  70. package/SVF-doxygen/wiki/svfpic/dockerdb6.jpeg +0 -0
  71. package/SVF-doxygen/wiki/svfpic/dockerdb7.png +0 -0
  72. package/SVF-doxygen/wiki/svfpic/dockerdb8.png +0 -0
  73. package/SVF-doxygen/wiki/svfpic/dockerdb9.jpeg +0 -0
  74. package/SVF-doxygen/wiki/svfpic/dockerfinshbuilt.png +0 -0
  75. package/SVF-doxygen/wiki/svfpic/dockerimage.png +0 -0
  76. package/SVF-doxygen/wiki/svfpic/dockernameImage.png +0 -0
  77. package/SVF-doxygen/wiki/svfpic/dockerpull.png +0 -0
  78. package/SVF-doxygen/wiki/svfpic/dockerpull2.png +0 -0
  79. package/SVF-doxygen/wiki/svfpic/download.jpg +0 -0
  80. package/SVF-doxygen/wiki/svfpic/extension1.jpeg +0 -0
  81. package/SVF-doxygen/wiki/svfpic/extension2.jpeg +0 -0
  82. package/SVF-doxygen/wiki/svfpic/graphviz.png +0 -0
  83. package/SVF-doxygen/wiki/svfpic/hellodb.png +0 -0
  84. package/SVF-doxygen/wiki/svfpic/hellodb2.png +0 -0
  85. package/SVF-doxygen/wiki/svfpic/hviz_0.png +0 -0
  86. package/SVF-doxygen/wiki/svfpic/hviz_1.png +0 -0
  87. package/SVF-doxygen/wiki/svfpic/hviz_2.png +0 -0
  88. package/SVF-doxygen/wiki/svfpic/installC:C++Ext.png +0 -0
  89. package/SVF-doxygen/wiki/svfpic/installCMakeExt.png +0 -0
  90. package/SVF-doxygen/wiki/svfpic/installRCext.png +0 -0
  91. package/SVF-doxygen/wiki/svfpic/installdockerext.png +0 -0
  92. package/SVF-doxygen/wiki/svfpic/launch1.png +0 -0
  93. package/SVF-doxygen/wiki/svfpic/openfile.png +0 -0
  94. package/SVF-doxygen/wiki/svfpic/pathfolder.png +0 -0
  95. package/SVF-doxygen/wiki/svfpic/restart.png +0 -0
  96. package/SVF-doxygen/wiki/svfpic/rundocker.png +0 -0
  97. package/SVF-doxygen/wiki/svfpic/runinCLI.png +0 -0
  98. package/SVF-doxygen/wiki/svfpic/screen.png +0 -0
  99. package/SVF-doxygen/wiki/svfpic/settings1.jpg +0 -0
  100. package/SVF-doxygen/wiki/svfpic/settings2.jpg +0 -0
  101. package/SVF-doxygen/wiki/svfpic/settings3.jpg +0 -0
  102. package/SVF-doxygen/wiki/svfpic/shortlists.png +0 -0
  103. package/SVF-doxygen/wiki/svfpic/start.png +0 -0
  104. package/SVF-doxygen/wiki/svfpic/start1.png +0 -0
  105. package/SVF-doxygen/wiki/svfpic/update0.png +0 -0
  106. package/SVF-doxygen/wiki/svfpic/verify_docker.png +0 -0
  107. package/SVF-doxygen/wiki/svfpic/vs_entry_window.png +0 -0
  108. package/SVF-doxygen/wiki/svfpic/wsl.png +0 -0
  109. package/SVF-doxygen/wiki/svfpic/wsl_1.png +0 -0
  110. package/SVF-doxygen/wiki/svfpic/wsl_2.png +0 -0
  111. package/SVF-doxygen/wiki/svfpic/wsl_3.png +0 -0
  112. package/SVF-doxygen/wiki/tools.png +0 -0
  113. package/SVF-doxygen/wiki/users.png +0 -0
  114. package/SVF-doxygen/wiki/vm1.png +0 -0
  115. package/SVF-doxygen/wiki/vm2.png +0 -0
  116. package/SVF-doxygen/wiki/vm3.png +0 -0
  117. package/SVF-doxygen/wiki/vm4.png +0 -0
  118. package/SVF-doxygen/wiki/vm5.png +0 -0
  119. package/SVF-doxygen/wiki/vscode_build_tasks.png +0 -0
  120. package/SVF-doxygen/wiki/vscode_cpp_extension.png +0 -0
  121. package/SVF-doxygen/wiki/vscode_debug_list.png +0 -0
  122. package/SVF-doxygen/wiki/vscode_dir_structure.png +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.1087",
3
+ "version": "1.0.1088",
4
4
  "description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -133,15 +133,14 @@ void BufOverflowDetector::handleStubFunctions(const SVF::CallICFGNode* callNode)
133
133
  bool isSafe = canSafelyAccessMemory(as, arg0Val, val);
134
134
  if (isSafe)
135
135
  {
136
- std::cout << "safe buffer access success: " << callNode->toString()
137
- << std::endl;
136
+ SVFUtil::outs() << SVFUtil::sucMsg("success: expected safe buffer access at SAFE_BUFACCESS")
137
+ << " — " << callNode->toString() << "\n";
138
138
  return;
139
139
  }
140
140
  else
141
141
  {
142
- std::string err_msg = "this SAFE_BUFACCESS should be a safe access but detected buffer overflow. Pos: ";
143
- err_msg += callNode->getSourceLoc();
144
- std::cerr << err_msg << std::endl;
142
+ SVFUtil::outs() << SVFUtil::errMsg("failure: unexpected buffer overflow at SAFE_BUFACCESS")
143
+ << " — Position: " << callNode->getSourceLoc() << "\n";
145
144
  assert(false);
146
145
  }
147
146
  }
@@ -162,14 +161,14 @@ void BufOverflowDetector::handleStubFunctions(const SVF::CallICFGNode* callNode)
162
161
  bool isSafe = canSafelyAccessMemory(as, arg0Val, val);
163
162
  if (!isSafe)
164
163
  {
165
- std::cout << "detect buffer overflow success: " << callNode->toString() << std::endl;
164
+ SVFUtil::outs() << SVFUtil::sucMsg("success: expected buffer overflow at UNSAFE_BUFACCESS")
165
+ << " — " << callNode->toString() << "\n";
166
166
  return;
167
167
  }
168
168
  else
169
169
  {
170
- std::string err_msg = "this UNSAFE_BUFACCESS should be a buffer overflow but not detected. Pos: ";
171
- err_msg += callNode->getSourceLoc();
172
- std::cerr << err_msg << std::endl;
170
+ SVFUtil::outs() << SVFUtil::errMsg("failure: buffer overflow expected at UNSAFE_BUFACCESS, but none detected")
171
+ << " — Position: " << callNode->getSourceLoc() << "\n";
173
172
  assert(false);
174
173
  }
175
174
  }
@@ -568,14 +567,14 @@ void NullptrDerefDetector::handleStubFunctions(const CallICFGNode* callNode)
568
567
  bool isSafe = canSafelyDerefPtr(as, arg0Val) && arg0Val->getId() != 0;
569
568
  if (!isSafe)
570
569
  {
571
- std::cout << "detect null pointer deference success: " << callNode->toString() << std::endl;
570
+ SVFUtil::outs() << SVFUtil::sucMsg("success: expected null dereference at UNSAFE_LOAD")
571
+ << " — " << callNode->toString() << "\n";
572
572
  return;
573
573
  }
574
574
  else
575
575
  {
576
- std::string err_msg = "this UNSAFE_LOAD should be a null pointer dereference but not detected. Pos: ";
577
- err_msg += callNode->getSourceLoc();
578
- std::cerr << err_msg << std::endl;
576
+ SVFUtil::outs() << SVFUtil::errMsg("failure: null dereference expected at UNSAFE_LOAD, but none detected")
577
+ << " — Position: " << callNode->getSourceLoc() << "\n";
579
578
  assert(false);
580
579
  }
581
580
  }
@@ -590,14 +589,14 @@ void NullptrDerefDetector::handleStubFunctions(const CallICFGNode* callNode)
590
589
  bool isSafe = canSafelyDerefPtr(as, arg0Val) && arg0Val->getId() != 0;
591
590
  if (isSafe)
592
591
  {
593
- std::cout << "safe load pointer success: " << callNode->toString() << std::endl;
592
+ SVFUtil::outs() << SVFUtil::sucMsg("success: expected safe dereference at SAFE_LOAD")
593
+ << " — " << callNode->toString() << "\n";
594
594
  return;
595
595
  }
596
596
  else
597
597
  {
598
- std::string err_msg = "this SAFE_LOAD should be a safe but a null pointer dereference detected. Pos: ";
599
- err_msg += callNode->getSourceLoc();
600
- std::cerr << err_msg << std::endl;
598
+ SVFUtil::outs() << SVFUtil::errMsg("failure: unexpected null dereference at SAFE_LOAD")
599
+ << " — Position: " << callNode->getSourceLoc() << "\n";
601
600
  assert(false);
602
601
  }
603
602
  }
@@ -350,7 +350,8 @@ void AbsExtAPI::initExtFunMap()
350
350
  {
351
351
  if (AbstractState::isInvalidMem(addr))
352
352
  {
353
- // double free here.
353
+ // Detected a double free — the address has already been freed.
354
+ // No action is taken at this point.
354
355
  }
355
356
  else
356
357
  {