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

TDataMember::GetOffset interfers to TDataMember::GetOffsetCint

Aperta
#23,777 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@pcanal ci sta già lavorando.

Dal 22/10/2026.

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
Ambito
backend

Direzione di ricerca

Start by locating TDataMember::GetOffset and TDataMember::GetOffsetCint, then trace how calling the former changes the latter's result for TAttImage::EImageQuality member kImgBest. Reproduce the two ROOT interpreter sequences in the issue and inspect the relevant tests or add a focused regression check. Done means GetOffsetCint() returns the expected offset whether or not GetOffset() was called first.

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

Descrizione

bug in:Core Libraries

The expected behavior is:

root [0] auto cl = TClass::GetClass("TAttImage")
(TClass *) 0xbbf001680
root [1] auto obj = cl->GetListOfDataMembers()->FindObject("kImgBest")
(TObject *) 0xbc1f61400
root [2] auto dm = dynamic_cast<TDataMember*>(obj)
(TDataMember *) 0xbc1f61400
root [3] dm->GetOffsetCint()
(long) 50498662736
root [4] .q

while calling GetOffset make the behavior incorrect:

root [0] auto cl = TClass::GetClass("TAttImage")
(TClass *) 0x94f7c5180
root [1] auto obj = cl->GetListOfDataMembers()->FindObject("kImgBest")
(TObject *) 0x94fc5cdc0
root [2] auto dm = dynamic_cast<TDataMember*>(obj)
(TDataMember *) 0x94fc5cdc0
root [3] dm->GetTypeName()
(const char *) "TAttImage::EImageQuality"
root [4] dm->GetOffset()
(long) 0
root [5] dm->GetOffsetCint()
(long) 0

Code snippet:

auto cl = TClass::GetClass("TAttImage")
auto obj = cl->GetListOfDataMembers()->FindObject("kImgBest")
auto dm = dynamic_cast<TDataMember*>(obj)
dm->GetTypeName()
dm->GetOffset(); // Call this or not call this change the behavior of the next function
dm->GetOffsetCint()
Lingua principale
C++
Stelle
3.3k
Fork
1.6k
Merge medio
2g 7h
PR unite (30g)
180

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 root-project/root

Tutte le issue di root-project/root

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.