当前位置:网站首页>smartBugs安装小问题总结
smartBugs安装小问题总结
2022-06-25 06:39:00 【想躺平的小陈】
smartBugs
SmartBugs 是一个执行框架,旨在简化分析工具对智能合约数据集的执行。
(1)一个基于 Docker 镜像轻松添加新分析工具的插件系统;
(2)工具的并行执行以加快执行时间;
(3)一种输出机制,可标准化工具输出结果的方式,并简化跨工具的输出过程。
(4)根据被分析合约的要求,自动检测和下载正确版本的 Solidity 编译器。
安装中所出现的问题
PS:smartbugs需要python3.8以上的版本,因为他其中用了海象运算符:=
在3.8以下的版本会针对:=
进行报错。
2022.4.4 第一次安装smartbugs,当smartbugs通过大量进行多线程池对智能合约数据集进行分析时,会出现以下问题,从而导致程序意外终止,合约分析失败
multiprocessing.pool.RemoteTraceback: # 主要是这个问题
""" 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的开发人员修复了这个bug,但是在重新安装时,我是用压缩包进行解压安装smartbugs,并非通过git clone
,程序可以运行,但是无结果,在result.log
中显示如下的问题standard_init_linux.go:178: exec user process caused "no such file or directory"
通过多方面查解,大部分博客给出的解释如下:
golang docker build 制作完进项后运行报错
出现该问题的原因是编译的环境和运行的环境不同,可能有动态库的依赖
1.默认go使用静态链接,在docker的golang环境中默认是使用动态编译。
2.如果想使用docker编译+alpine部署,可以通过禁用cgoCGO_ENABLED=0来解决。
3.如果要使用cgo可以通过go build --ldflags "-extldflags -static" 来让gcc使用静态编译。
总的来说,可能就是动态库依赖问题,但是不是不知道怎么改,我这边给出的解释:
(1)我是下载到本地windows后压缩上传到linux上,由于windows和linux之间的不一致性导致
(2)当我们用压缩包解压缩后,可能由于没用git clone 所以少掉了一些某些动态配置问题,导致了这个问题
给出解决方法,使用git clone https://github.com/smartbugs/smartbugs.git
进行下载安装,但在git clone过程中会出现如下错误:
首先说一下:这个方法时没用的,如下:
改成:git clone git://github.com/xxx.git
造成如下问题原因:
远程便捷HTTP传输请求数据时最大的缓存字节数,默认时1M字节,默认能满足大多数请求。而当git clone的是大文件,就需要调大git缓存值
解决方案:sudo git config --global http.postBuffer 5242880000
边栏推荐
- Path planner based on time potential function in dynamic environment
- LeetCode 每日一题——515. 在每个树行中找最大值
- Icon already includes gloss effects
- The e-book "action guide for large organizations to further promote zero code application platform" was officially released!
- CGLIB动态代理
- Large funds support ecological construction, and Plato farm builds a real meta universe with Dao as its governance
- 14 bs对象.节点名称.name attrs string 获取节点名称 属性 内容
- MCU IO explanation (pull-up pull-down quasi bidirectional input / output push-pull open drain)
- 【LeetCode】two num·两数之和
- Shell command learning
猜你喜欢
[pytest] modify the logo and parameterization in the allure Report
Debian introduction
太上老君的炼丹炉之分布式 Quorum NWR
Hanxin's trick: consistent hashing
Kube scheduler source code analysis (1) - initialization and startup analysis
用动图讲解分布式 Raft
高数基础_函数的奇偶性
【批处理DOS-CMD命令-汇总和小结】-添加注释命令(rem或::)
Enter an integer with any number of bits, and output the sum of each bit of the number. For example: 1234 – > 10
鸿蒙页面菜单的选择
随机推荐
【批处理DOS-CMD命令-汇总和小结】-CMD窗口的设置与操作命令(cd、title、mode、color、pause、chcp、exit)
Large funds support ecological construction, and Plato farm builds a real meta universe with Dao as its governance
Evolution of Alibaba e-commerce architecture
【批处理DOS-CMD命令-汇总和小结】-外部命令-cmd下载命令、抓包命令(wget)
SQL query, if value is null then return 1 - SQL query, if value is null then return 1
How do I know if mysqlnd is an active driver- How to know if MySQLnd is the active driver?
MySQL (12) -- Notes on changing tables
[C language] add separator to string
[leetcode] two num · sum of two numbers
48 pictures | teach you the performance monitoring, pressure testing and tuning of microservices by hand
Orcad Schematic常用功能
Google extender address
Enter an integer with any number of bits, and output the sum of each bit of the number. For example: 1234 – > 10
CGLIB动态代理
Genuine photoshop2022 purchase experience sharing
LabVIEW generate application (exe) and installer
Redirect to previous page after login? PHP - Redirecting to previous page after login? PHP
【UVM入門 ===> Episode_9 】~ 寄存器模型、寄存器模型的集成、寄存器模型的常規方法、寄存器模型的應用場景
诸葛亮 VS 庞统,拿下分布式 Paxos
指南针可以开股票账户吗?安全吗?