Skip to content

Conversation

@OrestZborowski-SIG
Copy link
Contributor

Enable /WX (treat warnings as errors).
Fix some basic errors that were found.
Enable /FC (emit full path on diagnostics) to make it easier for IDE.
Add (commented out) entries for enabling debug builds for dev.

Enable /WX (treat warnings as errors).
Fix some basic errors that were found.
Enable /FC (emit full path on diagnostics) to make it easier for IDE.
Add (commented out) entries for enabling debug builds for dev.
@OrestZborowski-SIG
Copy link
Contributor Author

Troubling... Check failed on Windows but it succeeded locally. Will investigate.

@OrestZborowski-SIG OrestZborowski-SIG marked this pull request as draft August 16, 2021 15:59
@OrestZborowski-SIG OrestZborowski-SIG marked this pull request as ready for review August 16, 2021 19:23
@OrestZborowski-SIG
Copy link
Contributor Author

Updated local env to Python 3.9 to uncover new UNICODE deprecation warnings, which now trigger errors due to /WX!
Also fixed a double-close of an SDS handle during error handling that was uncovered during testing.

{
return -(S_FALSE);
}
//UNUSED? if (!CheckWindowsSharedMemoryPrerequisites(pMappingName))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you considering the CheckWindowsSharedMemoryPrerequisites() function call as unused here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because in this UtilMappedViewReadBegin() the pMappingName is uninitialized, checked and subsequently unused. Likely the result of large copy+paste. I don't quite know where this is used, if it is, so I opted for the loud, ugly commenting-out style of remediation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In this case, it looks like the check is just happening in the wrong place; it looks like L567 is probably a better place for it (just prior to when the shared-memory mapping is created). If the check fails, you'd also need to dispose the allocated file handle before returning -(S_FALSE). The purpose of the check is to better handle the case where the user doesn't have permissions to create the shared-memory mapping -- so we can provide a reasonable error message to the user; otherwise, the call just fails and it's very non-obvious to the end-user why it happened.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought so too, until I saw on line 578 that pMappingName is unused. Hence none of this is necessary.
I don't know offhand if pMappingName should be used, in which case I would unwind all this UNUSED? nonsense and complete the implementation properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a new issue for implementing this and will keep the code commented out so it's safe.

@OrestZborowski-SIG OrestZborowski-SIG merged commit f9c9548 into master Oct 13, 2021
@OrestZborowski-SIG OrestZborowski-SIG deleted the w3_win_builds branch October 13, 2021 20:10
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