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
SI-8263 Avoid SOE in logicallyEnclosingMember #3506
Conversation
The fde88c7 introduced some loggging behind |
Yeah, that would be consistent. I've also found the root cause: a macro SBT creates a symbol owned by |
If the problem is on sbt side then why it doesn't crash on 2.10.x? W dniu środa, 12 lutego 2014 Jason Zaugg notifications@github.com
Grzegorz Kossakowski |
See: sbt/sbt#1113 |
We uncovered the problem with the fix for SI-2066. |
We've started calling this method during higher-kinded subtyping to ensure that variances of higher order type params in overriding as soundly aligned. Turns out that running this over the expansion of the SBT task macro leads to a SOE due to a corrupt owner chain. I've fixed that in SBT (sbt/sbt#1113), but we ought not crash like this. This commit considers NoSymbol to be its own enclosing member and logs a -Xdev warning. This is analagous to the handling of `NoSymbol.owner`.
@gkossakowski I've also updated this PR with a more detailed commit comment and a |
After thinking about it some more I wonder if fde88c7 and 555db25 are going in the right direction. Asking anything about NoSymbol makes no sense so why not just fail fast? In particular, SOE exhibited a real bug in sbt. If this patch was merged we wouldn't see the bug or it would fail in some other, more distant (from macro expansion logic) place. I don't see that as an improvement. I might have expressed that concern around the time fde88c7 was merged but I can't find the outcome of our discussion. |
It is at least consistent with:
|
Fair enough. I think I'll want to revisit this design choice in 2.12. |
LGTM. I'll merge once tests pass. |
Avoid SOE in logicallyEnclosingMember
Not sure when the regression hit, but we're seeing this in the
SBT build. It's probably a mistake to be calling this method
on somthing that isn't owned by a method, but let's not SOE
in that case.
This is analagous with the way the
NoSymbol#owner
doesnt throwand exception anymore.
Review by @gkossakowski