Fix issue 18084 - tempCString type should not change size when used in unittests.#5932
Fix issue 18084 - tempCString type should not change size when used in unittests.#5932andralex merged 1 commit intodlang:stablefrom
Conversation
|
Thanks for your pull request, @schveiguy! Bugzilla references
|
|
Crap, I didn't target stable. |
|
You can change the branch when you click on edit. Top right |
|
OK, I'll try it. Will it rebase automatically? |
Nope. Try: git rebase --onto upstream/stable |
|
OK, I think I got it. This may cause problems when merging back to master, because this whole file was refactored. |
|
ping, this is pretty trivial, and is a memory corruption bug. We should fix it ASAP. @MartinNowak @WalterBright @andralex @klickverbot |
|
Ah nuts. So the master version that I first targeted got merged into stable 😆 So I will rework this again back the way it was. At least there won't be any merge conflicts! |
|
OK, that should do it. @wilzbach the problem was that master had refactored the file, so when I retargeted stable, there were conflicts when trying to rebase. Then the master branch was merged into stable, so there were conflicts again! In any case, it should be good now (I hope). |
|
@MartinNowak target to stable? |
@schveiguy can you instantiate |
It's already targeted at
I'm glad you managed to work it out & sorry that you had to rebase this twice - bad timing :/ |
|
@jacob-carlborg I think the idea is to utilize all the existing uses of |
Aha, ok. I didn't look at |
|
yeah, |
- tempCStringW was fixed with dlang/phobos#5932
|
Thanks, I've been running into this misterious tempCStringW bug in my io library. |

Fixes memory corruption introduced when (ironically) trying to support dip25: #4746
Instead of the original mechanism (which was to slice the buffer with an enum), I just added padding when in unittest mode to make sure the size is the same. Very hard to unittest this, since unittests actually change the layout in the original! I'm open to suggestions.
ping @WalterBright