Memory corruption bugs (exit code 134)

未關閉
#1,248 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
rust
領域
tooling

研究方向

Start by reproducing the crash with the listed rust-code-analysis-cli command and one of the example repositories at the specified revision; the issue does not identify an internal file or test to inspect. Compare running against the whole project with the per-file workaround to narrow down where corruption occurs. Done means analysis completes without memory corruption on the reported examples.

由索引模型根據 Issue 內容生成。

描述

The tool crashes when analyzing some projects (version 0.0.25). If in $path is the path to the respective project, the call looks like this:

rust-code-analysis-cli --paths "$path" --metrics --output-format json

Examples

Here are some examples for the crashes:

Repository revision error file
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6d35786de28116ecf78797a62b84e6bf3c45aa5a munmap_chunk(): invalid pointer tools/perf/arch/x86/tests/insn-x86-dat-64.c
https://github.com/microsoft/TypeScript.git f350b52331494b68c90ab02e2b6d0828d2a22a74 munmap_chunk(): invalid pointer tests/cases/fourslash/reallyLargeFile.ts
https://codeberg.org/tenacityteam/tenacity.git 5b2330ba6131fd66f25fe805c1d89cc1c93c34b2 double free or corruption (out) libraries/lib-theme/ThemeAsCeeCode.h
https://github.com/opencv/opencv.git 808d2d596c475d95fedb6025c9ed425d62bba04c double free or corruption (out) 3rdparty/openexr/Half/toFloat.h
https://github.com/MariaDB/server.git c8bfb4dbd298998c699d4f7670b5867a62376764 double free or corruption (out) mysql-test/include/dbt3_s001.inc

Which of the two errors exactly occurs seems to be not stable.

Workaround

My current workaround is to call the CLI tool separate for every file. This at least allows getting the results for the other files, where it does not crash. However, this is maybe slower. The bash code looks like this:

find "$path" -path "$path/.git" -prune -o -type f -exec bash -c \
      'rust-code-analysis-cli --paths "$0" --metrics --output-format json || true' '{}' \;
主要語言
Rust
星號
469
分支
74
平均合併
17 小時 16 分鐘
30 天內合併 PR
10

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

mozilla/rust-code-analysis 的其他 Issue

查看 mozilla/rust-code-analysis 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。