fix Issue 11176 - array.ptr in @safe code may point past end of array#5860
fix Issue 11176 - array.ptr in @safe code may point past end of array#5860andralex merged 1 commit intodlang:masterfrom
Conversation
|
This is likely to be disruptive. |
|
Depends on dlang/druntime#1590 and dlang/phobos#4426 |
|
LGTM. I like this, it's a neat solution to the nasty can o' worms about when/whether/how |
|
Looks like there are still some std.format issues |
|
I'll mark this for merging. |
|
Auto-merge toggled on |
|
This is blocked by numerous Phobos issues with |
|
Auto-merge toggled off |
|
Turned off auto-merge for the time being so the autotester doesn't waste time on this while it is blocked. |
1bab969 to
64315d4
Compare
|
And again, and again, and again: Stop breaking code!
You already mention it yourself, but still do it.
As always, this is a lie. You're about to break almost 1K dub packages that all need similar PRs. |
|
@WalterBright, thanks for your PR! By analyzing the annotation information on this pull request, we identified @yebblies, @klickverbot and @9rnsr to be potential reviewers. @yebblies: The PR was automatically assigned to you, please reassign it if you were identified mistakenly. |
Current coverage is 87.42% (diff: 66.66%)@@ master #5860 diff @@
==========================================
Files 98 97 -1
Lines 56216 56194 -22
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 49143 49126 -17
+ Misses 7073 7068 -5
Partials 0 0
|
5ee6de4 to
8306c8f
Compare
|
Blocked by #6097 |
8306c8f to
620eda5
Compare
7fb624a to
598bb04
Compare
|
This one is ready-to-merge now. |
src/mtype.d
Outdated
| e.error("%s is not an expression", e.toChars()); | ||
| return new ErrorExp(); | ||
| } | ||
| else if (!(flag & 2) && sc.func && !sc.intypeof && sc.func.setUnsafe() && global.params.safe) |
|
Let's use a symbol for that |
598bb04 to
354c326
Compare
|
done |
The following DMD PRs added more rigorous safety checks directly affecting this project: * dlang/dmd#5852 (fix Issue 15399 - unaligned pointers are not `@safe`) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/emitter.d#L1011 * dlang/dmd#5940 (Unions may break immutability / unions with pointers are un-`@safe` ) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/event.d#L230 * dlang/dmd#5876 (Casting from `void[]` to `T[]` is erroneously considered `@safe`) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/loader.d#L186 * dlang/dmd#5860 (array.ptr in @safe code may point past end of array) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/zerostring.d#L35
The following DMD PRs added more rigorous safety checks directly affecting this project: * dlang/dmd#5852 (fix Issue 15399 - unaligned pointers are not `@safe`) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/emitter.d#L1011 * dlang/dmd#5940 (Unions may break immutability / unions with pointers are un-`@safe` ) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/event.d#L230 * dlang/dmd#5876 (Casting from `void[]` to `T[]` is erroneously considered `@safe`) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/loader.d#L186 * dlang/dmd#5860 (array.ptr in @safe code may point past end of array) - triggered at line: https://github.com/kiith-sa/D-YAML/blob/v0.5.3/source/dyaml/zerostring.d#L35
https://issues.dlang.org/show_bug.cgi?id=11176