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
Issue 9383 - Wrong context for contracts if closure [dis]appears in override function #4788
Conversation
/* __ensure is always called directly, | ||
* so it never becomes closure. | ||
/* __require and __ensure will always get called directly, | ||
* so they never make outer funcitons closure. |
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.
s/funcitons/functions/
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.
Thanks, fixed.
…in override function
Issue 9383 - Wrong context for contracts if closure [dis]appears in override function
Thanks! |
I think this broke something in my program. With this commit, I'm getting segfaults. Unfortunately this is a larger project, it will take some time to reduce, I guess. Anyway, here is part of the backtrace:
The code around these lines is: // relations.d:
@property accessor_(Class value)
in {
import vibe.data.bson : BsonObjectID;
assert(value is null || value.id != BsonObjectID.init);
} body {
cache = value;
if(value is null)
mixin(key ~ " = BsonObjectID.init;");
else
mixin(key ~ " = value.id;"); // line 22
}
// persistence.d:
static if(!hasField!(typeof(this), "_id")) {
@Field
BsonObjectID _id;
@property id() const { // line 46
return _id;
}
} @9rnsr Do you see anything suspicious? I can't be sure that I haven't done anything wrong, but I specifically checked (using |
@schuetzm This change actually introduced a git-head only regression 14779, and it's in progress to fix that in #4803. |
Thank you! I can confirm that the SEGV disappears with your fix :-) |
Issue 9383 - Wrong context for contracts if closure [dis]appears in override function
Issue 9383 - Wrong context for contracts if closure [dis]appears in override function
The regression has been introduce by issue 9383 fix (PR dlang#4788). In Win64, some function parameters are passed by reggisters (`SCshadowreg`). When the parameters are placed in closure context, their access was not well handled in dlang#4788.
The regression has been introduce by issue 9383 fix (PR dlang#4788). In Win64, some function parameters are passed by registers (`SCshadowreg`). When the parameters are placed in closure context, their access was not well handled in dlang#4788.
The regression has been introduce by issue 9383 fix (PR dlang#4788). In Win64, some function parameters are passed by registers (`SCshadowreg`). When the parameters are placed in closure context, their access was not well handled in dlang#4788.
The regression has been introduce by issue 9383 fix (PR dlang#4788). In Win64, some function parameters are passed by registers (`SCshadowreg`). When the parameters are placed in closure context, their access was not well handled in dlang#4788.
The regression has been introduce by issue 9383 fix (PR dlang#4788). In Win64, some function parameters are passed by registers (`SCshadowreg`). When the parameters are placed in closure context, their access was not well handled in dlang#4788. Also in Posix 64bit platforms, parameter variables have SCauto. So there was same issue.
The regression has been introduce by issue 9383 fix (PR dlang#4788). In Win64, some function parameters are passed by registers (`SCshadowreg`). When the parameters are placed in closure context, their access was not well handled in dlang#4788. Also in Posix 64bit platforms, parameter variables have SCauto. So there was same issue.
Introduced regression https://issues.dlang.org/show_bug.cgi?id=15984 |
https://issues.dlang.org/show_bug.cgi?id=9383