Skip to content

Fix incorrect memset call on an std::string #12982

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

OneBlue
Copy link
Collaborator

@OneBlue OneBlue commented May 28, 2025

Summary of the Pull Request

This pull request corrects an incorrect call to memset, writing zeroes in an std::string instead of simply calling clear()

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

This was originally caught by theoparis, see #12927

Validation Steps Performed

Ran the tests

@benhillis
Copy link
Member

@OneBlue - looks like pipelines aren't getting triggered.

@OneBlue
Copy link
Collaborator Author

OneBlue commented May 28, 2025

@OneBlue - looks like pipelines aren't getting triggered.

Yeah I'm still working on it

@Biswa96
Copy link

Biswa96 commented May 28, 2025

There is another similar compiler warning with memset probably.

src/linux/init/init.cpp:1075:12: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'struct _CREATE_PROCESS_PARSED' [-Wnontrivial-memcall]

@benhillis
Copy link
Member

There is another similar compiler warning with memset probably.

src/linux/init/init.cpp:1075:12: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'struct _CREATE_PROCESS_PARSED' [-Wnontrivial-memcall]

Yes this is similar, I'll take a look in a separate PR.

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