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

Call graph: macro invocations in a function's header (the defining macro, macros in the parameter list) are recorded as calls (gzdoom 2,327 false edges)

Aperta
#5,629 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start in the call-graph extraction code that identifies a function header before { and scans NAME( patterns; separate the defining macro and parameter-list macros from invocations inside the body. Add tests for C and C++ defining macros, TXT_UNCAST_ARG-style parameter macros, and a real macro call in the body. The change is done when headers no longer produce those false edges while body calls remain and the licensed DOOM-port rescan reports zero for these cases.

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

Descrizione

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

Problem

For macro-defined functions (#5461/#5563) the defining macro itself is recorded as a callee of the function it defines, and macros in a C parameter list are recorded as calls:

port (engine 0e2bf4ade) false edges
gzdoom 2,327 (e.g. src/am_map.cpp am_setmark -> CCMD, am_showalllines -> CUSTOM_CVAR)
odamex 691 (snd_nomusic -> CVAR_FUNC_IMPL)
eternity 669 (winmm_reset_type -> CONSOLE_VARIABLE)
doomsday 339
doom3-bfg 202 (idkfa -> CONSOLE_COMMAND_SHIP)
chocolate-doom 18 (src/setup/display.c:139 GenerateSizesTable -> TXT_UNCAST_ARG, a macro in the parameter list)

Counted as: callee is an ALL-CAPS name that appears as NAME( in the function's header (before its body {) and not in the body. Probably a side effect of macro-defined functions becoming functions in #5483: the header line CCMD(map) { is scanned for calls.

Acceptance

  • Calls are collected from the body only (or the header's macro invocation that defines the unit is excluded, plus macros used inside the parameter list); a macro called inside the body stays a call.
  • Tests per shape (defining macro C and C++, TXT_UNCAST_ARG-style parameter macro, a real macro call in the body).
  • Rescan: these counts go to 0 on the licensed DOOM C/C++ ports; goldens with drift explained.

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 41m
PR unite (30g)
978

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.