- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我的代码有一个错误: *** 检测到堆栈粉碎 ***: ./mummergpu 终止
我在stackoverflow上搜索了一下,解决方法是在环境变量中添加-fno-stack-protector
,但是我不知道怎么添加?谁能帮我 ?nakefile 如下:
all: clean mummergpu
.SUFFIXES : .cu .cu_dbg_o .c_dbg_o .cpp_dbg_o .cu_rel_o .c_rel_o .cpp_rel_o .cubin
## Reenable this for testing all variations
#include ../experiments/test_rule.mk
CUDA_INSTALL_PATH := /usr/local/cuda-8.0
# Compilers
NVCC := $(CUDA_INSTALL_PATH)/bin/nvcc
CXX := g++ $(PROFILE)
CC := gcc
LINK := g++ $(PROFILE)
# Add source files here
STATIC_LIB := libmummergpu.a
# Cuda source files (compiled with cudacc)
CUFILES := mummergpu.cu
# C/C++ source files (compiled with gcc / c++)
CCFILES := \
mummergpu_gold.cpp suffix-tree.cpp PoolMalloc.cpp
最佳答案
考虑使用“-fstack-protector-strong”而不是“all”。通过“-fstack-protector-all”,它可以对所有功能应用保护,而不管它们实际上是否需要这种保护,从而对性能产生更大的影响。
在此处查找更多详细信息:https://lwn.net/Articles/584225/
“Strong”堆栈保护器旨在仅向那些实际上可能需要此保护的函数添加堆栈保护。
您可以使用其他参数来 ./configure 命令以包括堆栈保护:
./configure [options] CFLAGS='-fstack-protector-strong' CXXFLAGS='-fstack-protector-strong'
但是,某些软件包稍后可能会覆盖它。
这是在 Makefile 中为 CFLAGS 应用堆栈保护的命令:运行:
sed '/^.*CFLAGS = / s/$/ -fstack-protector-strong' /path/to/Makefile
一旦输出被验证并且可以接受在 Makefile 上应用更改,运行带有 -i 开关的 sed,如下所示:
sed -i '/^.*CFLAGS = / s/$/ -fstack-protector-strong' /path/to/Makefile
关于linux - 如何将 "-fstack-protector-all"添加到 makefile?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54284907/
-fstack-protector 和 -fstack-protector-all 是保护基于堆的内存分配还是只保护基于堆栈的内存分配? 前两个和 -fmudflap 有什么区别? 关于哪个更适合调试
我编写了以下 C 程序来查看缓冲区溢出的工作原理。我已保存此程序文件,名称为 bo.c #include #include int authentication(char *k
有人知道为什么下面的代码行会抛出 *** stack smashing detected *** 错误 #include #include #include int main(int argc,
我用 C 编写了一个应用程序,我试图了解编译时 -fno-stack-protector 命令的用途。对于我的具体应用,是否使用此命令在防止缓冲区溢出方面没有区别。 我在网上看到 -fstack-pr
我正在开展一个学校项目,基本上我们正在尝试了解堆栈溢出。我正在处理的一些示例代码基本上是:(精简) char test[10]; int i; for (i=0;i < 10000;i++) {
我的代码有一个错误: *** 检测到堆栈粉碎 ***: ./mummergpu 终止我在stackoverflow上搜索了一下,解决方法是在环境变量中添加-fno-stack-protector,但是
这些天我正在寻找安全编码指南,并且有一个选项可以防止 缓冲区溢出。 一个, $gcc -fstack-protector -S test.c $cat test.s 两个, $gcc -O -D_FO
我有以下功能: void f(){ char a[]="THIS IS A STR 1"; char b[]="THIS IS A STR 2"; char c[]="THIS
我一直遇到堆栈崩溃问题,而且我很难找到原因。堆栈粉碎错误只是偶尔发生,而且只发生在程序执行的最后阶段。当我使用 gcc 的“fstack-protector”选项编译它时,它也完全停止发生。我想知道使
我正在使用 DPAPI(Data Protector API)来保护和取消保护数据。我正在从文件中读取数据。 C:\Users\nandkishore.sharma\AppData\Local\Goo
一些安全建议建议在编译我的 Android 二进制文件时启用 fstack-protector。 Q1> 如果我没有使用 NDK,这是否适用? Q2> 在我的 gradle 构建过程中我应该在哪里配置
我开发了一个 android 应用程序,一个安全团队实现了安全测试,并向我发送了一个没有“-fstack-protector”选项的 Realm 库漏洞。原始消息:“堆栈金丝雀可以大大增加利用堆栈缓冲
我在笔记本电脑上运行 Ubuntu 16.10; 我最近从 git 下载了 Linux 内核,但是当我尝试从终端使用 make 命令编译它时。 它给了我 "error:Cannot use CONFI
这几天我一直在想 App 是如何喜欢 Android Protector 的确实有效。 我主要关心的是如何检测正在启动的特定应用程序以及如何锁定执行一段时间直到用户输入解锁键(手势模式或密码)。 作为
我正在尝试在 GCC 3.4.3 编译器中设置选项 -fstack-protector-all 以启用一些堆栈粉碎保护方案。然而,当用这个编译时,我得到了 错误:无法识别的命令行选项“-fstack-
我在 Linux Ubuntu 14.04 上。我想开始 Linux 内核模块编程。我有 hello.c(简单的 Hello World 模块)和 Makefile。但是,在“make”命令中,我得到
我正在尝试测试缓冲区溢出示例。 下面是我尝试使用文件名 buffOVF.c 进行编译的代码: #include #include int main(void) { //stack corr
当我 sudo pip install pyquery、sudo pip install lxml 和 sudo pip install cython 时,我得到非常相似的输出错误说: x86_64-
现在是 7 月,可能与许多公司的 iOS 部门的许多开发人员一样,我们公司也在测试 Xcode 11 的不同 beta 版本,只要它们在 Apple 开发人员门户中发布。 我们正在处理一个由许多 po
我是一名优秀的程序员,十分优秀!