rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

Disable compiler warnings on MS Windows builds

Open pin113 opened this issue 2 years ago • 5 comments

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 avatar Sep 27 '22 13:09 pin113

Are there any plans to resolve this issue?

pin113 avatar Oct 25 '22 17:10 pin113

Is there an accompanying Pull Request?

adamretter avatar Oct 27 '22 12:10 adamretter

Is someone looking into this issue?

pin113 avatar Nov 20 '23 15:11 pin113

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.

rhubner avatar Jan 04 '24 13:01 rhubner

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?

ajkr avatar Jan 04 '24 20:01 ajkr