Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: multiple double frees of DataProxy_SQLite #727

Open
ikbenkous opened this issue Jun 25, 2024 · 1 comment
Open

Bug: multiple double frees of DataProxy_SQLite #727

ikbenkous opened this issue Jun 25, 2024 · 1 comment
Labels
bug Something isn't working ToBeConfirmed Bug reports that needs to be confirmed or reproduced by the development tea.
Milestone

Comments

@ikbenkous
Copy link
Contributor

ikbenkous commented Jun 25, 2024

FileAwardManager in its constructor takes a DataProxy_SQLite pointer from outside. This pointer is then internally deleted.
This causes a segmentation fault. This has to be a double free, right?!

From a cursory reading, I recommend upgrading DataProxy_SQLite* to a std::shared_ptr<DataProxy_SQLite> object. I don't know if that makes sense at all.

@ikbenkous
Copy link
Contributor Author

It seems a variable called dataProxy gets deleted in a lot of places. Are all of these duplicate frees?

charts/statscqzperyearbarchartwidget.cpp:    delete(dataProxy);
charts/statsentitiesperyearbarchartwidget.cpp:    delete(dataProxy);
charts/statsfieldperbandwidget.cpp:    delete(dataProxy);
charts/statsgridsonsatswidget.cpp:    delete(dataProxy);
charts/statsqsosperbandbarchartwidget.cpp:    delete(dataProxy);
charts/statsqsospercontinentbarchartwidget.cpp:    delete(dataProxy);
charts/statsqsosperdxccbarchartwidget.cpp:    delete(dataProxy);
charts/statsqsosperhourbarchartwidget.cpp:    delete(dataProxy);
charts/statsqsospermodebarchartwidget.cpp:    delete(dataProxy);
charts/statsqsospermonthbarchartwidget.cpp:    delete(dataProxy);
charts/statsqsosperyearbarchartwidget.cpp:    delete(dataProxy);
charts/statssentconfirmedpiechartwidget.cpp:    delete(dataProxy);
charts/statsworkedconfirmedpiechartwidget.cpp:    delete(dataProxy);
charts/statsworkedsentpiechartwidget.cpp:    delete(dataProxy);
dxcluster/dxcluster.cpp:    delete(dataProxy);
fileawardmanager.cpp:    //delete(dataProxy);
inputwidgets/mainwindowinputeqsl.cpp:    delete(dataProxy);
inputwidgets/mainwindowinputqso.cpp:    delete(dataProxy);
inputwidgets/mainwindowmydatatab.cpp:    delete(dataProxy);
inputwidgets/mainwindowsattab.cpp:    delete(dataProxy);
lotwutilities.cpp:    delete(dataProxy);
searchmodel.cpp:    delete(dataProxy);
searchwidget.cpp:    delete(dataProxy);
searchwindow.cpp:    delete(dataProxy);
setuppages/setuppagesatsnew.cpp:    delete(dataProxy);
setuppages/setuppagesubdivisionnew.cpp:    delete(dataProxy);
setuppages/setuppageuserdata.cpp:    delete(dataProxy);
widgets/map/mapwindowwidget.cpp:    delete(dataProxy);

@ikbenkous ikbenkous changed the title Bug: double free in FileAwardManager Bug: multiple double frees of DataProxy_SQLite Jun 25, 2024
@ea4k ea4k added bug Something isn't working ToBeConfirmed Bug reports that needs to be confirmed or reproduced by the development tea. labels Aug 27, 2024
@ea4k ea4k added this to the KLog-2.4 milestone Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ToBeConfirmed Bug reports that needs to be confirmed or reproduced by the development tea.
Projects
None yet
Development

No branches or pull requests

2 participants