- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我的 C 程序在 Linux 上遇到了一些问题。它在 Windows 上编译和运行得很好。 Linux 终端返回此信息:
*** stack smashing detected ***: ./student terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x4b)[0xb7e908ab]
/lib/libc.so.6(__fortify_fail+0x0)[0xb7e90860]
./student[0x8048c09]
./student[0x80486dd]
/lib/libc.so.6(__libc_start_main+0xe5)[0xb7dc0775]
./student[0x80485e1]
======= Memory map: ========
08048000-0804a000 r-xp 00000000 00:11 11222 /mnt/win/POT03/Eclipse/student
0804a000-0804b000 r--p 00001000 00:11 11222 /mnt/win/POT03/Eclipse/student
0804b000-0804c000 rw-p 00002000 00:11 11222 /mnt/win/POT03/Eclipse/student
0804c000-0821a000 rw-p 0804c000 00:00 0 [heap]
b7da9000-b7daa000 rw-p b7da9000 00:00 0
b7daa000-b7eeb000 r-xp 00000000 75:00 116292 /lib/libc-2.9.so
b7eeb000-b7eed000 r--p 00141000 75:00 116292 /lib/libc-2.9.so
b7eed000-b7eee000 rw-p 00143000 75:00 116292 /lib/libc-2.9.so
b7eee000-b7ef1000 rw-p b7eee000 00:00 0
b7ef4000-b7f01000 r-xp 00000000 75:00 116275 /lib/libgcc_s.so.1
b7f01000-b7f02000 r--p 0000c000 75:00 116275 /lib/libgcc_s.so.1
b7f02000-b7f03000 rw-p 0000d000 75:00 116275 /lib/libgcc_s.so.1
b7f03000-b7f06000 rw-p b7f03000 00:00 0
b7f06000-b7f22000 r-xp 00000000 75:00 116288 /lib/ld-2.9.so
b7f22000-b7f23000 r--p 0001b000 75:00 116288 /lib/ld-2.9.so
b7f23000-b7f24000 rw-p 0001c000 75:00 116288 /lib/ld-2.9.so
bf8eb000-bf900000 rw-p bf8eb000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
Aborted
我可以用这些信息做什么来追踪问题?
最佳答案
使用调试信息编译您的程序,然后使用 valgrind 运行。
gcc -g student.cpp -o student
valgrind ./student
尝试调试器:
gcc -g student.cpp -o student
gdb ./student
run
// wait for it to crash
backtrace
help // to figure out what else you can do
关于c - stack smashing后报错信息怎么办,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2307233/
我正在努力学习本教程 https://github.com/cf-platform-eng/spring-boot-cities/tree/master/cities-service在 Cloud F
0){ echo "Username or email already exists."; }else{ $query = mysql_que
我想在Linux上编译ARToolKit源码,下载源码,按照ARToolKit文档,配置GLUT , OpenGL, libjpeg 等库。 转到 ARToolKit 目录并键入 ./Configer
你好,我在这个程序中遇到错误,wcout 不是 `std' 的成员。如您所见,我也使用了 iostream,但没有用。我有 Dev-C++ 4.9.9.2,我的操作系统是 XP SP3我需要你的帮助。
我尝试对一个网站进行多次投票,但我得到: panic: runtime error: invalid memory address or nil pointer dereference [signal
当我将“ using namespace std; int main(){ string s[30]; int n = 20; for(int i = 0; i using
我设置了 EMAIL_URL process.env.MAIL_URL="smtp://xx%40gmail.com:yyy@smtp.gmail.com:465" 这个工作找到了 Email.sen
我有如下文件夹结构 . ├── docker-compose.yml └── web-app ├── create_tomcat_admin.sh ├── Dockerfile
这是我在 php 中的查询代码: $query3 = mysql_query("SELECT * FROM area_of_work") or die('Invalid query:'. mysql_
我正在尝试将 therubyracer/therubyracer-heroku 安装到我的应用程序,因为它在 heroku 服务器中不起作用,因为我没有 javascript 运行时环境。 当我尝试安
我正在开发一个非常简单的 React 应用程序。它有一个组件,在这个组件中,我试图在单击链接时设置状态。但出于某种原因,setState 甚至没有得到认可。它带有下划线,表示未解析的函数或方法 set
我有三个来源:代码处理.h typedef enum {typeBool, typeVarDeclaration, typeFuncDeclaration } nodeEnum; typedef st
我正在尝试从我的 Android 手机向 raspi 发送连续的命令。我使用了此链接中的代码,但出现错误。 链接:https://stackoverflow.com/questions/2347143
我正在尝试从数据库中加载数据并将其放入不同的 View 中。 log cat 返回错误,它找不到“_id”列。 有人可以帮我解决这个问题吗? SqlHelper代码: public class Fib
我的alertview给出了这个问题..它与sqlite无关..它给出了一些信息.. 我该如何解决这个问题? UIAlertView *infoShow = [[UIAlertView alloc]
这个问题在这里已经有了答案: launch activities from different package (5 个答案) 关闭 10 年前。 最近我一直在开发一个新的应用程序,我正在尝试使用
这是我的代码: #include #include typedef struct test { int *a; char *s; }TEST; int main (void) {
所以我定义了一个函数,如果它是由它的 lonesome 实现的,那么它非常适合对线性数组进行合并排序,但是如果我把它放到一个类中,它就会出错。我认为这是一个很好的例子,说明我不太了解类(class)的
我是 IOS 新手。我有一个示例项目,并试图在此基础上学习 Obj-C。 现在我正处于学习如何使用 UIAlertController 的阶段。我有这样的代码: if (loanAmount == 0
当我尝试使用 wincachegrind 并获取 cachegrind 文件时,它返回 Cannot find call target. cachegrind.out line number:68 有
我是一名优秀的程序员,十分优秀!