Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Call graph: a call to a different same-named function in another scope (Scope::X -> free X, C# explicit interface impl) is dropped as if it were recursion

クローズ
#5,628 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c, cpp, python
領域
devtools, testing

調査の方向性

Start by reading gitgalaxy/core/detector.py:1295, especially _drop_nested_declaration_calls, and inspect the call-graph tests and #3360 nested-declaration cases. Reproduce direct recursion and a qualified call such as Scope::f calling free f, then adjust the filter so it excludes the enclosing unit itself without restoring nested declaration edges. Run the relevant detector tests, followed by the licensed DOOM corpus goldens if available; expected results should retain same-named cross-scope calls and make the listed self-recursion and cross-scope miss counts approach zero.

索引モデルが issue の本文から書いたものです。

説明

bug core-engine metrics needs:doom-corpus priority: high scope:core

Problem

A function's call to itself, and a qualified method's call to a same-named function in another scope, are missing from calls_out_to.

port (engine 0e2bf4ade) self-recursion not recorded qualified caller -> same-named other function missed
linuxdoom 3 (R_RenderBSPNode, P_RecursiveSound, P_CrossBSPNode) 0
chocolate-doom 24 0
dsda-doom 21 0
odamex 236 2
eternity 114 3
doom3-bfg 163 15
doomsday 544 87
gzdoom 652 515 (e.g. src/common/2d/v_draw.cpp:1511 _Screen::VirtualToRealCoords -> free VirtualToRealCoords)

Likely cause (confirm)

gitgalaxy/core/detector.py:1295 _drop_nested_declaration_calls (#3360 C5) drops a callee when a unit of that leaf name starts inside the caller's line range. The caller's own definition always starts inside its own range, so its own leaf name is always dropped: that removes true recursion, and (because it compares leaf names) any call to X from Scope::X.

Acceptance

  • The filter ignores the enclosing unit itself (compare unit identity/start, not just the leaf name); a call to a same-named function in another scope is kept; real nested declarations are still dropped (#3360 cases keep passing).
  • Tests: direct recursion (C, C++, and one non-C language that shares the path), Scope::f calling free f, macro-thunk calling the native of the same name, and the #3360 nested-declaration shapes.
  • DOOM licensed C/C++ ports: the counts above go to ~0 under the independent body oracle; goldens updated with the drift explained (this is a call-graph change, PageRank/fan-in move).

Found by the DOOM corpus call-graph consensus check (#5620, #5457): near-identical ports vote on each call edge, and an independent body oracle re-extracts calls from source. Licensed ports only.

🤖 Generated with Claude Code

主要言語
Python
スター
57
フォーク
11
平均マージ
1時間 32分
マージ済み PR(30日)
990

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

squid-protocol/gitgalaxy のほかの issue

squid-protocol/gitgalaxy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。