Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Relooper can exhaust the stack when processing large functions

未关闭
#1,908 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 5 天内回复

@arbelonson-source 已经在做这个了。

开始于 2026年9月15日。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
compilers

调研方向

Read the relooper implementation and trace how it processes sequential CFG nodes after a Simple block; the issue does not name a file or test path. Reproduce the stack overflow with the blake_256 test case, then verify that sequential nodes are processed without tail-recursive calls and the test completes without requiring a larger-stack thread.

由索引模型根据 Issue 内容生成。

描述

Our relooper implementation is tail-recursive, meaning that as we process nodes in the CFG we recursively call into relooper to process the subsequent nodes. In working on https://github.com/immunant/c2rust/pull/1827 I found that the threads used when running tests have a small enough stack size that we overflow the stack when trying to transpile the blake_256 test case. In that PR I work around it by spawning a thread with a larger stack, but that's not a robust solution. The proper fix here is to tweak relooper to use a loop when processing sequential nodes instead of tail-recursing after each Simple block. Should be straightforward to implement but I want to split it off of #1827 to avoid bloating that PR.

主要语言
Rust
星标
4.8k
派生
318
平均合并
3 天 20 小时
30 天内合并 PR
7

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

immunant/c2rust 的其他 Issue

查看 immunant/c2rust 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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