当前位置:网站首页>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
边栏推荐
- 线程状态变化涉及哪些常用 API
- Leetcode daily question - 515 Find the maximum value in each tree row
- Sichuan Tuwei ca-if1051 can transceiver has passed aec-q100 grade 1 certification
- MySQL face Scripture eight part essay
- el-input实现尾部加字
- Redis learning notes
- Mysql database import SQL file display garbled code
- How comfortable it is to use Taijiquan to talk about distributed theory!
- 【批处理DOS-CMD命令-汇总和小结】-cmd扩展命令、扩展功能(cmd /e:on、cmd /e:off)
- This year, I graduated
猜你喜欢

What is the difference between norflash and nandflash

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

What common APIs are involved in thread state changes
![[leetcode] two num · sum of two numbers](/img/9e/79c9deae9f853a265b5b536998b655.png)
[leetcode] two num · sum of two numbers

数据可视化没有重点怎么办?

Chuantu microelectronics breaks through the high-end isolator analog chip market with ca-is3062w

npm install 报错 : gyp ERR! configure error

鸿蒙页面菜单的选择

Harmony food menu interface
![对链表进行插入排序[dummy统一操作+断链核心--被动节点]](/img/2a/ccb1145d2b4f9fbd8d0812deace93b.png)
对链表进行插入排序[dummy统一操作+断链核心--被动节点]
随机推荐
ELK + filebeat日志解析、日志入库优化 、logstash过滤器配置属性
Modular programming of digital light intensity sensor module gy-30 (main chip bh1750fvi) controlled by single chip microcomputer (under continuous updating)
How comfortable it is to use Taijiquan to talk about distributed theory!
Without "rice", you can cook "rice". Strategy for retrieving missing ground points under airborne lidar forest using "point cloud intelligent mapping"
SQL solve select basic statement
[batch dos-cmd command - summary and summary] - application startup and call, service and process operation commands (start, call, and)
Selection of Hongmeng page menu
13 `bs_ duixiang. Tag tag ` get a tag object
Distributed quorum NWR of the alchemy furnace of the Supreme Master
Let's talk about MCU crash caused by hardware problems
Chuantuwei ca-is3720lw alternative material No. iso7820fdw
LeetCode 每日一题——515. 在每个树行中找最大值
诸葛亮 VS 庞统,拿下分布式 Paxos
【批處理DOS-CMD命令-匯總和小結】-cmd擴展命令、擴展功能(cmd /e:on、cmd /e:off)
JMeter introduction practice ----- use of global variables and local variables
Global variables & local variables
MySQL facet 01
[Batch dos - cmd Command - Summary and Summary] - External Command - cmd Download Command, wget Command
NSIS 静默安装vs2013运行时
Why "New Year's Eve", the original memory burst!