Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#5,628 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, cpp, python
Ambito
devtools, testing

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
57
Fork
11
Merge medio
1h 32m
PR unite (30g)
990

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di squid-protocol/gitgalaxy

Tutte le issue di squid-protocol/gitgalaxy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.