本文介绍了堆栈保护可能已禁用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行 rootbeer 库中的第一个示例,您可以从 中找到该示例这里.

I am trying to run the first example in rootbeer library, which you can find from here.

问题是,即使我遵循了他们的所有说明,当我尝试运行 Jar 时还是收到以下消息

The issue is, even though I followed all of their instructions, I am getting the following message when I am trying to run the Jar

root@ubuserver3:/home/ubuadmin/JavaJars/HelloWordGPU# java -jar HelloWorldGPU.jar
OpenJDK Client VM warning: You have loaded library /usr/lib/libcuda.so.319.37 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.NullPointerException
        at org.trifort.rootbeer.runtime.Rootbeer.run(Rootbeer.java:104)
        at ScalarMult.test(ScalarMult.java:13)
        at Main.main(Main.java:17)

我不是Linux人,所以我不明白如何正确执行这个命令.我也不明白他们所说的这条消息是什么意思,因为这是我第一次进行 GPU 编程.但我知道用错误​​的命令来处理 GPU 会是一个问题.

I am not a Linux person, so I do not understand how to execute this command properly. I also don't understand what they mean by that message, because this is the first time I am on GPU programming. But I know messing with GPU with wrong commands would be a problem.

推荐答案

键入:execstack --version 以检查您是否已经安装了 execstack.

Type: execstack --version to check if you already have execstack installed.

如果找不到命令,请输入:sudo apt-get install execstack -y --force-yes

If you get command not found type: sudo apt-get install execstack -y --force-yes

输入 sudo execstack -c 例如 sudo execstack -c/usr/lib/libcuda.so

这篇关于堆栈保护可能已禁用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 20:52