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 17423 - pointer assignment to in member function is not ac… #7999

Merged
merged 1 commit into from
Mar 18, 2018

Conversation

WalterBright
Copy link
Member

…counted for

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
17423 normal pointer assignment to this in member function is not accounted for

@WalterBright WalterBright force-pushed the fix17423 branch 2 times, most recently from 09bdcbd to 2cdcaa3 Compare March 11, 2018 08:36
foreach (VarDeclaration v; ad.fields)
{
if (v.hasPointers())
return stc;
Copy link
Member

Choose a reason for hiding this comment

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

This looks suspicious.

Copy link
Member Author

Choose a reason for hiding this comment

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

don't know what you mean

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Member Author

Choose a reason for hiding this comment

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

What about it? Please don't make me guess.

Copy link
Member

@wilzbach wilzbach Mar 11, 2018

Choose a reason for hiding this comment

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

Sorry - my point was only that these two lines are uncovered, thus return stc is never called and thus all code that you added has never an effect for the testcase.

Copy link
Member Author

Choose a reason for hiding this comment

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

never mind, I see

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be covered now.

foreach(_; o) { i = 0; }
i = x;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

The test file from the bug report still triggers in a segfault (with this PR).

Copy link
Member Author

Choose a reason for hiding this comment

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

It fails to compile with -dip1000

Copy link
Member

Choose a reason for hiding this comment

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

Oh my point was that 17423 isn't fixed by this PR because the segfault still exists and with -dip1000 it currently doesn't segfault: https://run.dlang.io/is/W1DGlg

Copy link
Member Author

Choose a reason for hiding this comment

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

My point is -dip1000 is required to fix it. The whole point of dip1000 is to fix these sorts of issues.

@WalterBright
Copy link
Member Author

Why are the coverage test results not showing up in the code view anymore?

@wilzbach
Copy link
Member

Why are the coverage test results not showing up in the code view anymore?

They are for me:

image

Though I needed to hit refresh after I went to the diff view, maybe that's a new bug from CodeCov ...

@WalterBright
Copy link
Member Author

Yes, it worked for me too after I hit refresh. Thanks for the tip! Anyhow, it's all green now and good to go.

@wilzbach
Copy link
Member

FYI: I opened an issue (codecov/browser-extension#53), but the extension seems to be unmaintained (codecov/browser-extension#52).

@WalterBright
Copy link
Member Author

@JinShil @wilzbach please approve.

@dlang-bot dlang-bot merged commit eee17da into dlang:master Mar 18, 2018
@JinShil
Copy link
Contributor

JinShil commented Mar 18, 2018

Done. Please consider returning the favor by reviewing some of the pull requests that require someone with your unique skills and position.

@WalterBright WalterBright deleted the fix17423 branch March 18, 2018 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants