Skip to content
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

Fix Issue 18670 - compiler segfault if new on a union type with dip1000 #8095

Merged
merged 1 commit into from Mar 29, 2018

Conversation

RazvanN7
Copy link
Contributor

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
18670 critical compiler segfault if new on a union type with dip1000

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "stable + dmd#8095"

@wilzbach
Copy link
Member

Hmm SemaphoreCi seems to have troubles with this:

std/path.d(1740): Error: scope variable path assigned to chained with longer lifetime
std/file.d(3003): Error: template instance `std.path.buildNormalizedPath!char` error instantiating

(I restarted the build)


// https://issues.dlang.org/show_bug.cgi?id=18670

void foo() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @safe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ICE happened without @safe and I thought the general policy is to copy/paste the submitted samples to the testsuite?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, another case were DIP1000 is not doing what it's supposed to do (nothing DIP1000 related should be checked outside of @safe code).

@RazvanN7
Copy link
Contributor Author

RazvanN7 commented Mar 28, 2018

@wilzbach I have no idea why that error might occur. The code changes affect compilation only if -dip1000 is used and all the check does is avoid calling a method on an empty object. The only thing that comes to mind is a situation in which the patch is applied on a different version of dmd/druntime/phobos then the one I am using.

@wilzbach
Copy link
Member

The only thing that comes to mind is a situation in which the patch is applied on a different version of dmd/druntime/phobos then the one I am using.

Yep, SemaphoreCi seems to checkout master - I think #8097 should (hopefully) fix this.

@WalterBright WalterBright added the Vision Vision Plan https://wiki.dlang.org/Vision/2018H1 label Mar 29, 2018
@WalterBright WalterBright merged commit 15213da into dlang:stable Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Vision Vision Plan https://wiki.dlang.org/Vision/2018H1
Projects
None yet
5 participants