Envelope fields left uninitialized by envelope::alloc; CProxySection_ArrayBase::ckSend loop wraps for an empty section

Aperta
#4,223 0 commenti 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
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Start by reading envelope::alloc and CProxySection_ArrayBase::ckSend, the two code paths named in the report, and inspect their existing tests for envelope initialization and empty sections. Check how messages are allocated, sent, and freed when a section has no elements. Done means unset envelope fields are initialized in every build and empty sections do not wrap the loop or lose the original message.

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

Descrizione

Found while fixing the uninitialized ifNotThere in section sends.

  • envelope::alloc zeroes the envelope only under CMK_REPLAYSYSTEM. Fields that a send path does not set explicitly keep whatever the allocator returned; ifNotThere was one such field. Zeroing the envelope header in every build would close the whole class at a small cost per message.
  • CProxySection_ArrayBase::ckSend loops with i < _elems.size() - 1; for a section ID with no elements the unsigned subtraction wraps and the loop reads past the vector. When the last section ID in the list is empty, the original message is neither sent nor freed.

🤖 Generated with Claude Code

Lingua principale
C++
Stelle
241
Fork
62
Merge medio
1g 1h
PR unite (30g)
125

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 charmplusplus/charm

Tutte le issue di charmplusplus/charm

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.