-
-
Notifications
You must be signed in to change notification settings - Fork 747
Fix issue 18084 - tempCString type should not change size when used in unittests. #5932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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, |
wilzbach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW this is an excellent example why StdUnittest would be really useful (see #5927).
- 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