This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit d425aaf
Fixes StringBuilder unbounded size growth in Clear() when we use a mix of Append and Insert (#16926)
* Fixing Clear infinitely growing when we combine usage of Insert and Append. Fixes #27625
* Move debug code to StringBuilder.Debug.cs and Applied code review feedback
* Adding missing debug condition check
* Adding comments and moving Condition on projitems after filename
* Moving the infinite capacity growth fix to Length setter
* Removing originalCapacity and Debug.Assert
* Applying PR feedbacks
* Minor cleanup
* simplifying to single loop
* keeping just one method for ShowChunks function
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>1 parent 8b70122 commit d425aaf
File tree
3 files changed
+44
-5
lines changed- src/Common/src/CoreLib
- System/Text
3 files changed
+44
-5
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
524 | 525 | | |
525 | 526 | | |
526 | 527 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
466 | | - | |
467 | 465 | | |
468 | 466 | | |
469 | 467 | | |
470 | 468 | | |
471 | | - | |
472 | 469 | | |
473 | 470 | | |
474 | 471 | | |
| |||
485 | 482 | | |
486 | 483 | | |
487 | 484 | | |
488 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
502 | 501 | | |
503 | 502 | | |
504 | 503 | | |
| |||
0 commit comments