Skip to content

Conversation

@hackecord
Copy link

@hackecord hackecord commented Sep 30, 2019

Summary of the Pull Request

References

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

miniksa and others added 21 commits May 21, 2019 00:01
…azzle

[Git2Git] Merged PR 3285709: Add chafa resource into the DLL built by Windows Razzle #21439265

Add chafa resource into the DLL built by Windows Razzle #21439265
Fix a bunch of static analysis issues (GH553)

* static analysis fixes
* using C++ style casts
* explicit delete changed to reset(nullptr)
* fix for null apiMsg.OtherId during tracing in Compare()
* changed INVALID_ID macro to constexpr
* properly handle null ReplyMsg in ConsoleIoThread()
* Fixed wrong static_cast for State.InputBuffer
* compensate for null reply message to fix deref problem of ReplyMsg in srvinit.cpp by changing signature in DeviceComm.h

Related work items: #21767097
…ECORE_DEP_ACIOSS

[Git2Git] Git Train: Merge of building/rs_onecore_dep_acioss/190523-1700 into official/rs_onecore_dep_acioss Retrieved from official/rs_onecore_dep_acioss 3fceea90bee761aa93d91c0184a7217d1e2d404b

Related work items: #18974333
* cfc72ce (origin/dev/duhowett/ibxint, github/master) Make sure cursor blinks after opening new tab (1030)
* 9ad2544 Fix microsoft#936: misuse of uninitialized objects causes AppVerifier breaks on Windows Terminal startup (1015)
* 5f938a0 Update Terminal.cpp (1034)
* 4c47631 Cleanup - termDispatch.hpp & adaptDispatch.hpp overrides (1004)
* cc30475 add audit mode to ci (948)
* 80f1079 Fix the bell sound when Alt+key is pressed. (1006)
* 42e87ed fix build break from using `await` instead of `co_await` (1009)
* 40b557a Update manifest to correct 1903 version, unref param fix (1008)
* 0f62ec8 Eat all tap keypresses no matter what. (985)
* ce0eaab inbox: Merge accumulated build fixes from RS_ONECORE_DEP_ACIOSS (1002)
* 1c50968 add .editorconfig file (585)
* efd6999 Add support for OSC 10 and 11 to set the default colors (891)

Related work items: #21610659, #21838182
…nter we're QI-ing from

Even wil::com_ptr_nothrow can still inadvertantly throw an 'access violation exception' when null pointer deref-ing (WIL won't check if it's null before attempting, CComQIPtr apparently didn't care.

Related work items: #21776133, #21781836
…between the WDDMCon Renderer and the SCREEN_INFORMATION

[Git2Git] Merged PR 3330475: Synchronize the font between the WDDMCon Renderer and the SCREEN_INFORMATION

Synchronize the font between the WDDMCon Renderer and the SCREEN_INFORMATION when the OneCore Interactivity library starts up. #21717424

Related work items: #21717424 Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_acioss ccca0315e7db34c09f5fcd9dfabae666ede1687b

Related work items: #21717424
coming from GH master 8a69be0

Related work items: #18974333, #21717424
 (microsoft#1139)

Flush input queue before running test. microsoft#1137 (microsoft#1139)

Flushes the input queue on RawReadUnpacksCoalescedInputRecords test to ensure that other tests cannot cause failure by leaving extraneous input records behind after they run.

This only failed in the core operating system gate tests. This is because those tests run a subset of the complete test suite (subtracting the ones that do not make sense in a core environment). Apparently one of the tests that was skipped that normally runs prior to the UnpacksCoalesced test ensured that the input queue was clean enough for this test to succeed. But in the core environment, the test that ran prior left stuff behind.

To resolve this, I'm making the Coalesced test more resilient by cleaning out the queue prior to performing its operations.

(Also, bonus, I'm fixing the typo in the name Coalesced.)

This is less complicated/expensive than tracking down the tests that are leaving garbage behind, should prevent issues in the future related to ordering (since the tests run alphabetically, by default), and isn't as expensive as running the test in isolation (with its own conhost stood up for just the one test.)

Validated by running te.exe Microsoft.Console.Host.FeatureTests.dll /name:*InputTests* against a core operating system variant. Prior to change, this test failed. After the change, this test succeeded.

This will be automatically double-checked by the gates run after check-in.
… yield invalid data… (GH1129)

Change ParseNext function in UTF16 parser to never yield invalid data… (GH1129)

The solution here isn't perfect and isn't going to solve all of our problems. I was basically trying to stop the crash while not getting in the way of the other things coming down the pipe for the input channels.

I considered the following:
1. Remove the fail fast assertion from the buffer
  - I didn't want to do this because it really is invalid to get all the way to placing the text down into the buffer and then request a string of 0 length get inserted. I feel the fail fast is a good indication that something is terribly wrong elsewhere that should be corrected.
2. Update the UTF16 parser in order to stop returning empty strings
  - This is what I ultimately did. If it would ever return just a lead, it returns �. If it would ever return just a trail, it returns �. Otherwise it will return them as a pair if they're both there, or it will return a single valid codepoint. I am now assuming that if the parse function is being called in an Output Iterator and doesn't contain a string with all pieces of the data that are needed, that someone at a higher level messed up the data, it is in valid, and it should be repaired into replacements.
  - This then will move the philosophy up out of the buffer layer to make folks inserting into the buffer identify half a sequence (if they're sitting on a stream where this circumstance could happen... one `wchar_t` at a time) and hold onto it until the next bit arrives. This is because there can be many different routes into the buffer from many different streams/channels. So buffering it low, right near the insertion point, is bad as it might pair loose `wchar_t` across stream entrypoints.
3. Update the iterator, on creating views, to disallow/transform empty strings.
  - I considered this solution as well, but it would have required, under some circumstances, a second parsing of the string to identify lead/trail status from outside the `Utf16Parser` class to realize when to use the � character. So I avoided the double-parse.
4. Change the cooked read classes to identify that they pulled the lead `wchar_t` from a sequence then try to pull another one.
   - I was going to attempt this, but @adiviness said that he tried it and it made all sorts of other weirdness happen with the edit line.
   - Additionally, @adiviness has an outstanding series of effort to make cooked read significantly less horrible and disgusting. I didn't want to get in the way here.
5. Change the `GetChar` method off of the input buffer queue to return a `char32_t`, a `wstring_view`, transform a standalone lead/trail, etc.
    - The `GetChar` method is used by several different accessors and API calls to retrieve information off of the input queue, transforming the Key events into straight up characters. To change this at that level would change them all.  Long-term, it is probably warranted to do so as all of those consumers likely need to become aware of hand ...

Related work items: #20990158
…d namespace issues introduced by GitHub merge

[Git2Git] Merged PR 3344233: Fix build warnings and namespace issues introduced by GitHub merge

Related work items: #18974333 Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_acioss 76d61f82da64f58b615a9a7f1528f0e55443777e

Related work items: #18974333
… into official/rs_onecore_dep_acioss Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_acioss 6fa4fbe485365ed72be2f557621fe58d4fc75197

[Git2Git] Git Train: FI of official/rs_onecore_dep into official/rs_onecore_dep_acioss Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_acioss 6fa4fbe485365ed72be2f557621fe58d4fc75197

Related work items: #18974333
Related work items: #21610659
This is a mechanical code formatting change.

Related work items: #22098184
… into official/rs_onecore_dep_acioss Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_acioss 9638166d8c8374081a2aa8b8f9ecabf2bae0df0a

[Git2Git] Git Train: FI of official/rs_onecore_dep into official/rs_onecore_dep_acioss Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_acioss 9638166d8c8374081a2aa8b8f9ecabf2bae0df0a

Related work items: #18974333
Related work items: #22702360, #22702370, #22702376
…487638: inbox: merge github changes up to 122f0de

[Git2Git] Merged PR 3487659: [Git2Git] Merged PR 3487638: inbox: merge github changes up to 122f0de

[Git2Git] Merged PR 3487638: inbox: merge github changes up to 122f0de

Related work items: #22702360, #22702370, #22702376 Retrieved from https://microsoft.visualstudio.com OpenConsole Dart inbox 3111752

Related work items: #22702360, #22702370, #22702376 Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_uxp aa5182a2b1dceefb61e09aad392aac0a56970d80

Related work items: #22702360, #22702370, #22702376
@msftclas
Copy link

msftclas commented Sep 30, 2019

CLA assistant check
All CLA requirements met.

@DHowett-MSFT
Copy link
Contributor

Don't make pull requests from our internal branches.

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.

5 participants