out of bound access when building TLegend
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Check duplicate issues.
- Checked for duplicates
Description
A simple plotting example of a histogram produces
/usr/include/c++/16/bits/stl_bvector.h:1158: constexpr std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
In a debug build with GCC 16. See reproducer below.
The issue stems from https://github.com/root-project/root/blob/94606761150e817bf1c91c76fc1083deecfdcf33/graf2d/gpad/src/TPad.cxx#L3171 which allows accessing the one-after-last element of the vector.
Reproducer
#include <gtest/gtest.h>
#include <TCanvas.h>
#include <TH1D.h>
TEST(TH2D, DrawWithBuildLegend)
{
TH1D h1{"h1", "h1", 10, 0, 1};
auto nFills{10};
for (auto i = 0; i < nFills; i++) {
h1.Fill(0.45);
}
// Set a range on the Y axis lower cannot contain the maximum value: this triggered a bug in TPad::FillCollideGridTH1
// which would access the vector to find empty spaces for the legend out of bounds.
h1.GetYaxis()->SetRangeUser(0, 8);
TCanvas c;
h1.Draw();
// Need to check that BuildLegend can work also when the Y axis does not contain the maximum value
c.BuildLegend();
}
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
ROOT version
Any
Installation method
From source
Operating system
Linux
Additional context
No response
- Lingua principale
- C++
- Stelle
- 3.3k
- Fork
- 1.6k
- Merge medio
- 2g 14h
- PR unite (30g)
- 192
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di root-project/root
-
thisroot.sh: wrong ROOTSYS in zsh when the shell's command line has a newlineForse già presa @dpiparo l’ha presa 8 giorni fa. Apertabug in:Build System
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
root-project/root#23746 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
RDataLoader: wrong train/validation split with lazy loading, filtered inputs and shuffle=FalseForse già presa @siliataider l’ha presa 1 giorno fa. Apertabug in:ML
root-project/root#23842 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[graph] TScatter / TScatter2D stops drawing remaining points if a non-positive value is encountered in log scaleForse già presa @muntasir-396 l’ha presa 2 giorni fa. Apertabug good first issue in:Graphics
root-project/root#23833 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
TDataMember::GetOffset interfers to TDataMember::GetOffsetCintForse già presa @pcanal l’ha presa 5 giorni fa. Apertabug in:Core Libraries
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
root-project/root#23777 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
`TChain::GetEntries` internal caching ineffective?Forse già presa @pcanal l’ha presa 11 giorni fa. Apertaimprovement in:TTree
root-project/root#23738 · 6 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di root-project/root
Issue simili
-
Status: Needs confirmation Status: Needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
boykopovar/AnyPS5#12124 ·
I maintainer di solito rispondono entro 1 giorno
-
bug-unconfirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
A-combat P-low S-ready-to-start task
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno