antirez / antirez/kilo

Seg Fault

未关闭
#76 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
9.1k
派生
995
PR 合并指标
30 天内没有已合并 PR

描述

When trying to do `./kilo clip.c` , I get `zsh: segmentation fault kilo clip.c`. [View clip.c](https://github.com/a-p-jo/CLIp/blob/main/clip.c).

macOS 11.2.2, on x86_64 Intel CPU, compiled with clang and gcc (tried both, tried all optimisation levels), using default terminal and zsh.

Will try on linux and update.

**EDIT 1 :**
Possibly due to one/some of the errors posted in #77 .

Most likely:
```
kilo.c:1211:9: warning: 'break' will never be executed [-Wunreachable-code-break]
break;
kilo.c:1307:12: warning: 'return' will never be executed [-Wunreachable-code-return]
return 0;
```
or some other UB / EB ?

**EDIT 2:**
It *does not* instantly seg fault. It takes quite a few seconds. And it seems to use the CPU highly during this.
it is read and writing *Gigabytes* of data during this ! WTF

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。