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

Disable compiler warnings on MS Windows builds #10745

Closed
pin113 opened this issue Sep 27, 2022 · 5 comments
Closed

Disable compiler warnings on MS Windows builds #10745

pin113 opened this issue Sep 27, 2022 · 5 comments

Comments

@pin113
Copy link

pin113 commented Sep 27, 2022

Expected behavior

A compiler warning is typically required if it has a high likelihood of flagging memory corruption, information disclosure, or double-free vulnerabilities. To resolve this issue, enable the indicated warning(s) by removing /Wxxxx switches (where xxxx is a warning id indicated here) from your command line, and resolve any warnings subsequently raised during compilation.

Actual behavior

The current build disables compiler warnings which are reported by BinSkim. BinSkim is a binary static analysis tool and Microsoft is suggesting to run BinSkim for best practices to improve the security of their products. BinSkim is part of the MVI program and it is our goal to meet the requirements of the MVI program.

Steps to reproduce the behavior

@pin113
Copy link
Author

pin113 commented Oct 25, 2022

Are there any plans to resolve this issue?

@adamretter
Copy link
Collaborator

Is there an accompanying Pull Request?

@pin113
Copy link
Author

pin113 commented Nov 20, 2023

Is someone looking into this issue?

@rhubner
Copy link
Contributor

rhubner commented Jan 4, 2024

Hello @pin113,

Thank you for reporting this issue. I think your suggestions make sense, but I don't know how much RocksDB code is ready. I tried to remove some compiler flags and compile rocksdb and this are the results :

  • 4127 - ❌ Doesn't build
  • 4800 - ✅ Build OK
  • 4996 - ❌ Doesn't build
  • 4351 - ✅ Build OK - Unable to find in MSVC documentation.
  • 4100 - ❌ Doesn't build
  • 4204 - ✅ Build OK
  • 4324 - ❌ Doesn't build

I created PR #12205 for removing those who are working.

@ajkr
Copy link
Contributor

ajkr commented Jan 4, 2024

removing /Wxxxx switches (where xxxx is a warning id indicated here)

Where is "here"? Should there be a list of warnings we can't disable with accompanying reasons?

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 a pull request may close this issue.

4 participants