当前位置:网站首页>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
边栏推荐
- Reading sensor data with GPIO analog SPI interface
- 【批處理DOS-CMD命令-匯總和小結】-外部命令-cmd下載命令、抓包命令(wget)
- [introduction to UVM== > episode_9] ~ register model, integration of register model, general methods of register model, application scenarios of register model
- 正版photoshop2022购买体验经历分享
- This year, I graduated
- Icon already includes gloss effects
- Distributed quorum NWR of the alchemy furnace of the Supreme Master
- 【批处理DOS-CMD命令-汇总和小结】-文件与目录操作命令(md、rd、xcopy、dir、cd、set、move、copy、del、type、sort)
- MySQL (12) -- Notes on changing tables
- N – simple encoding
猜你喜欢

Ppt template of small fresh open class education courseware
![Analysis on the trend of the number of national cinemas, film viewers and average ticket prices in 2021 [figure]](/img/01/594990789cbc1817dbbf61b7dd0c4c.jpg)
Analysis on the trend of the number of national cinemas, film viewers and average ticket prices in 2021 [figure]

JMeter introduction practice ----- use of global variables and local variables

从感知机到Transformer,一文概述深度学习简史

Orcad Schematic常用功能

Don't you know the evolution process and principle of such a comprehensive redis cluster model?

What is the new business model of Taishan crowdfunding in 2022?

Selection of Hongmeng page menu
![[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

威迈斯新能源冲刺科创板:年营收17亿 应收账款账面价值近4亿
随机推荐
How to store the directory / hierarchy / tree structure in the database- How to store directory / hierarchy / tree structure in the database?
为什么要“除夕”,原来是内存爆了!
用动图讲解分布式 Raft
Unity3D邪门实现之GUI下拉菜单Dropdown设计无重复项
alphassl通配符证书送一个月
Tempest HDMI leak receive 1
三年营收连续下滑,天地壹号困在醋饮料里
Rotation vector (rotation matrix) and Euler angle
How do I know if mysqlnd is an active driver- How to know if MySQLnd is the active driver?
稳压二极管的原理,它有什么作用?
Why "New Year's Eve", the original memory burst!
MCU IO explanation (pull-up pull-down quasi bidirectional input / output push-pull open drain)
[Yu Yue education] engineering testing technology reference of Wenhua University
【批处理DOS-CMD命令-汇总和小结】-应用程序启动和调用、服务和进程操作命令(start、call、)
MySQL - definition and assignment of variables
13 `bs_duixiang.tag标签`得到一个tag对象
正版photoshop2022購買體驗經曆分享
Redis learning notes
指南针可以开股票账户吗?安全吗?
Omni toolbox direct download