Go 程序运行时与垃圾收集器有关的紧急情况

时间:2024-02-08

浏览:386

作者:佚名

大家好,今天本人给大家带来文章《Go 程序运行时与垃圾收集器有关的紧急情况》,文中内容主要涉及到,如果你对Golang方面的知识点感兴趣,那就请各位朋友继续看下去吧~希望能真正帮到你们,谢谢!

问题内容

我从 github 安装了一个 go 程序,当我运行它时,出现错误,

panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.18 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.18 set. Notably, if go1.18 adds a moving garbage collector, this program is unsafe to use.

似乎没有太多与此相关的信息。我的 go 编码经验为零。

非常感谢任何帮助。我很乐意提供您可能需要的任何额外信息。

ps:我安装的程序是metabigor,它是通过go install github.com/j3ssie/metabigor@latest安装的。


正确答案


您还可以使用 go get -u go4.org/unsafe/assume-no-moving-gc 升级 assume-no-moving-gc 来解决此问题。

本篇关于《Go 程序运行时与垃圾收集器有关的紧急情况》的介绍就到此结束啦,但是学无止境,想要了解学习更多关于Golang的相关知识,请关注golang学习网公众号!

本文内容来源于互联网,如有侵权请联系删除。

相关文章

更多

近期热门

更多

站内热门

更多

热门专题

更多
首页