39817966: [WinAppSDK 1.1] Unpackaged + self-contained Blank Project crashes at startup #2562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Undocked RegFree WinRT had a long-standing bug in ParseFileTag() where it retrieved the filename via
xmlReader->GetValue()
into a raw pointer and then used it AFTER callingxmlReader->Read()
. That's a no-no -- GetValue returns a raw pointer to the current-context; you need to deep-copy if if you want to use it after you change the parser's current-context (e.g. by calling Read), as per https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms752870(v=vs.85)The key phrase:
When you move the reader to another node, XmlLite may reuse the memory referenced by the pointer. Therefore, you should not use the pointer after calling one of the following methods:...
This could coincidentally work if you had small RegFreeWinRT info in your manifest, but that was pure luck of memory layout.
This issue exists in URFW from before we forked copy. URFW should be likewise fixed, tracked per RegFreeWinRT support has bug in string handling that leads to failed DLL lookup #776