小编Sud*_*ale的帖子

lldb 给出错误“错误:进程退出状态为 -1(错误 1)”

使用 lldb 时,基本 C 程序的调试失败

程序是:hello.c

#include <stdio.h>
int main()
{
printf("Hello world\n");
return (0);
}
Run Code Online (Sandbox Code Playgroud)

编译后,链接并运行lldb,然后运行命令。显示错误

$ lldb hello

(lldb) target create "hello"

Current executable set to 'hello' (x86_64).

(lldb) run

error: process exited with status -1 (Error 1)
Run Code Online (Sandbox Code Playgroud)

非常感谢这方面的任何帮助

c lldb

11
推荐指数
1
解决办法
1773
查看次数

收到错误:a.out(40780,0x1130af600) malloc: 由于无法预分配保留的虚拟机空间而放弃纳米区域

我的程序cc非常简单

#include <stdio.h>

int main()
{
    int ret = 0;

    return ret;
}
Run Code Online (Sandbox Code Playgroud)

当我使用“clang -fsanitize=address cc ”编译它并运行 a.out 时,会显示以下消息,但是程序运行成功

a.out(40820,0x106ffe600) malloc:由于无法预分配保留的虚拟机空间,纳米区域被放弃。

代码使用(Xcode 13)Apple clang版本13.0.0(clang-1300.0.29.3)编译目标:x86_64-apple-darwin21.1.0线程模型:posix

操作系统是 macOS Monterey (12.0.1)

任何更好地理解这一点的见解都会有所帮助

c macos clang

9
推荐指数
1
解决办法
2915
查看次数

标签 统计

c ×2

clang ×1

lldb ×1

macos ×1