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

additional memory allocation checks #18114

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

ralfbrown
Copy link
Collaborator

I noticed that this has been sitting around for a while....

Could be tagged bugfix and slotted in for 5.0.1 although it isn't fixing any reported bugs. Won't fight for that, though.

The checks in pdf.c, printprof.c, and utility.c are the ones most likely to be triggered by OOM since they are allocating full images.

@ralfbrown ralfbrown added the scope: codebase making darktable source code easier to manage label Dec 29, 2024
@TurboGit TurboGit added this to the 5.2 milestone Dec 30, 2024
@jenshannoschwalm
Copy link
Collaborator

I would prefer to always use dt_print() instead of fprintf() ...

@ralfbrown
Copy link
Collaborator Author

Those fprintf() calls are inside an #ifdef STANDALONE, and would require including darktable.h (and thus most of darktable's headers, plus linking in darktable.c and everything it pulls in) to replace them with dt_print calls.

Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit TurboGit merged commit f690ca0 into darktable-org:master Jan 21, 2025
6 checks passed
@ralfbrown ralfbrown deleted the malloc_checks branch January 21, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: codebase making darktable source code easier to manage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants