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

Use logFileName static buffer directly #7

Open
wants to merge 1 commit into
base: lumentum-v3
Choose a base branch
from

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented Feb 21, 2025

Conditionally allocating memory for log_file_path leads to a bug when logging is disabled because pimegaDetector::setDefaults() will later attempt to set the PimegaLogFile parameter based on this uninitialized member. Considering that this was introduced by the fixed commit which aims at hiding the struct fields, and that such hinding no longer makes sense, simply revert to the original approach of using logFileName directly.

Fixes: 0d94f9e (Removed direct pimega pointer calls, 2024-02-23)


Fixes #6

Conditionally allocating memory for log_file_path leads to a bug when
logging is disabled because pimegaDetector::setDefaults() will later
attempt to set the PimegaLogFile parameter based on this uninitialized
member. Considering that this was introduced by the fixed commit which
aims at hiding the struct fields, and that such hinding no longer makes
sense, simply revert to the original approach of using logFileName
directly.

Fixes: 0d94f9e (Removed direct pimega pointer calls, 2024-02-23)
@liteAlvaroCosta
Copy link

[...] and that such hiding no longer makes sense

Hi! Could you please explain why does it no longer makes sense?

@ericonr
Copy link
Member Author

ericonr commented Mar 22, 2025

[...] and that such hiding no longer makes sense

Hi! Could you please explain why does it no longer makes sense?

Because we published ADPimega with the entire git history, so anyone can see what members of struct pimega exist. The commit that this PR fixes was hiding direct accesses to the pimega struct with the intention to publish a repository without any history, which we gave up on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants