当前位置:网站首页>Summary of small problems in smartbugs installation
Summary of small problems in smartbugs installation
2022-06-25 07:41:00 【Xiao Chen who wants to lie flat】
smartBugs
SmartBugs Is an execution framework , It aims to simplify the execution of analysis tools on smart contract data sets .
(1) One is based on Docker Mirror the plug-in system that easily adds new analysis tools ;
(2) Parallel execution of tools to speed up execution time ;
(3) An output mechanism , The way the tool outputs results can be standardized , And simplify the output process across tools .
(4) According to the requirements of the analyzed contract , Automatically detect and download the correct version of Solidity compiler .
Problems during installation
PS:smartbugs need python3.8 Version above , Because he used walrus operator := stay 3.8 The following versions will be for := Error reporting .
2022.4.4 First installation smartbugs, When smartbugs When analyzing smart contract data sets through a large number of multi-threaded pools , There will be the following problems , This causes the program to terminate unexpectedly , Contract analysis failed
multiprocessing.pool.RemoteTraceback: # Mainly this problem
""" Traceback (most recent call last): File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar return list(map(*args)) File "smartBugs.py", line 45, in analyse raise e File "smartBugs.py", line 31, in analyse analyse_files(tool, file, logs, output_folder, sarif_outputs, output_version, import_path) File "/blockchain/smartbug/smartbugs/src/docker_api.py", line 233, in analyse_files if solc_compiler is not None: UnboundLocalError: local variable 'solc_compiler' referenced before assignment """
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "smartBugs.py", line 176, in <module>
exec_cmd(args)
File "smartBugs.py", line 147, in exec_cmd
pool.map(analyse, tasks)
File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 768, in get
raise self._value
UnboundLocalError: local variable 'solc_compiler' referenced before assignment
2022.6.21 smartBugs Our developers fixed this bug, But when reinstalling , I use the compressed package to decompress and install smartbugs, Not through git clone, The program can run , But no results , stay result.log The following questions are shown in standard_init_linux.go:178: exec user process caused "no such file or directory" Find out through various ways , Most blogs give the following explanations :
golang docker build After making the input item, run and report an error
The reason for this problem is that the compiling environment is different from the running environment , There may be dynamic library dependencies
1. Default go Use static links , stay docker Of golang Dynamic compilation is used by default in the environment .
2. If you want to use docker compile +alpine Deploy , You can disable cgoCGO_ENABLED=0 To solve .
3. If you want to use cgo Can pass go build --ldflags "-extldflags -static" To make the gcc Use static compilation .
in general , It may be the problem of dynamic library dependency , But I don't know how to change it , The explanation I give here :
(1) I download it locally windows After compression, upload to linux On , because windows and linux Inconsistencies between lead to
(2) When we decompress with the compressed package , Maybe it's useless git clone So some dynamic configuration problems are missing , It's causing this problem
Give solutions , Use git clone https://github.com/smartbugs/smartbugs.git Download and install , But in git clone The following errors will occur during the process :
First of all : This method useless , as follows :
Change to :git clone git://github.com/xxx.git
Causes of the following problems :
Remote and convenient HTTP Maximum number of cache bytes when transferring request data , by default 1M byte , By default, it can meet most requests . And when git clone It's a big file , You need to turn it up git Cache value
Solution :sudo git config --global http.postBuffer 5242880000
边栏推荐
- Zhugeliang vs pangtong, taking distributed Paxos
- Construction of occupancy grid map
- Runtime——methods成员变量,cache成员变量
- PI Ziheng embedded: This paper introduces the multi-channel link mode of i.mxrt timer pit and its application in coremark Test Engineering
- Several good weather plug-ins
- NSIS 静默安装vs2013运行时
- 13 `bs_ duixiang. Tag tag ` get a tag object
- 14 BS object Node name Name attrs string get node name attribute content
- Tempest HDMI leak receive 1
- IAR compiler flashback
猜你喜欢
![对链表进行插入排序[dummy统一操作+断链核心--被动节点]](/img/2a/ccb1145d2b4f9fbd8d0812deace93b.png)
对链表进行插入排序[dummy统一操作+断链核心--被动节点]

What if there is no point in data visualization?

How comfortable it is to use Taijiquan to talk about distributed theory!

el-input实现尾部加字
![[Introduction aux uvm== > Episode 9] ~ modèle de registre, intégration du modèle de registre, méthode conventionnelle du modèle de registre, scénario d'application du modèle de registre](/img/c0/b373a3f0e0c7b35f42c8a28b4d4f74.png)
[Introduction aux uvm== > Episode 9] ~ modèle de registre, intégration du modèle de registre, méthode conventionnelle du modèle de registre, scénario d'application du modèle de registre

Three years of continuous decline in revenue, Tiandi No. 1 is trapped in vinegar drinks

Chuantu microelectronics 𞓜 subminiature package isolated half duplex 485 transceiver

Application scheme | application of Sichuan earth microelectronics ca-is398x in PLC field

【批处理DOS-CMD命令-汇总和小结】-应用程序启动和调用、服务和进程操作命令(start、call、)
![[Batch dos - cmd Command - Summary and Summary] - External Command - cmd Download Command, wget Command](/img/00/5a5b081b78ad6a6c1c3a3c847dd315.png)
[Batch dos - cmd Command - Summary and Summary] - External Command - cmd Download Command, wget Command
随机推荐
Three years of continuous decline in revenue, Tiandi No. 1 is trapped in vinegar drinks
LabVIEW generate application (exe) and installer
Construction of occupancy grid map
Application scheme | application of Sichuan earth microelectronics ca-is398x in PLC field
图扑软件数字孪生 3D 风电场,智慧风电之海上风电
高数基础_函数的奇偶性
College entrance examination voluntary filling, why is the major the last consideration?
Introduction to Sichuan Tuwei ca-is3082wx isolated rs-485/rs-422 transceiver
Genuine photoshop2022 purchase experience sharing
Full range of isolator chips with integrated isolated power supply
[batch dos-cmd command - summary and summary] - add comment command (REM or::)
Domestic MCU perfectly replaces STM chip model of Italy France
Global variables & local variables
Estimation of dense forest volume based on LIDAR point cloud with few ground points
Tempest HDMI leak receive 1
IAR compiler flashback
(tool class) quickly add time to code in source insight
【蒸馏】PointDistiller: Structured Knowledge DistillationTowards Efficient and Compact 3D Detection
【批處理DOS-CMD命令-匯總和小結】-外部命令-cmd下載命令、抓包命令(wget)
Home environment monitoring system design (PC version) (mobile app version to be determined)