Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 8189936: [Git2Git] Lift an optional check out of RefreshRow…
…IDs loop to fix a crash In the most recent compiler ingestion into Windows ("LKG14"), we found that this particular construction--checking an optional for a value during this range-for loop--resulted in bad code generation. When optimized, it generates code that looks effectively like this: ```c++ if (!newRowWidth.has_value()) { while (true) { // do the row stuff... ++it; } } ``` The loop never exits, and `_RefreshRowIDs` walks off the end of the buffer. Whoops. This commit fixes that issue by tricking the optimizer to go another way. Leonard tells me it's harmless to call `Resize` a bunch of times, even if it's a no-op, so I trust that this change results in the right outcome with none of the crashing. Fixes MSFT-41456525 Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_we_adept_e4d2 c2b3697c867bddf5660da8b222e99ff4bfd1ea5b
- Loading branch information