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
cmd/compile: runtime failure with unified IR ("unreachable method called") #51519
Comments
Sorry about that, looking into it. (FWIW, I did actually test |
Smaller repro:
|
Hmm, I can't reproduce the bug with this program, using |
@cuonglm Did you patch in CLs 315273 and 360015? |
Ops, I did checkout CL 360015 using |
The issue seems sensitive to the use of the |
This is the simplest repro I've come up with so far:
|
@cherrymui suggests looking at
"bad" here means the test case as presented above. "good" is with the blank assignment in main.main commented out (which doesn't trigger the runtime panic). |
@cherrymui Are you able to help make sense of the above diff? |
For the diff above, it looks like the RHS of the arrows are the same set of symbols? So it looks like the set of symbols marked live are the same. It looks like the failing call is |
It looks to me that under unified IR mode, when both the main package and the elliptic package defines the function When unified IR mode is not used, they are also defined in both packages but marked as dupOK so the linker can dedup them. I think the method symbol should be marked at dupOK in unified mode as well. |
@cherrymui Thanks! Marking the instantiated functions as DUPOK seems to fix it. |
Change https://go.dev/cl/390956 mentions this issue: |
https://go.dev/cl/360015 is still failing on linux-amd64-unified after #49536 was fixed.
https://storage.googleapis.com/go-build-log/6a77cb42/linux-amd64-unified_ff342a8e.log
/cc @mdempsky
The text was updated successfully, but these errors were encountered: