-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 PIE tests on ppc64le port #3498
Conversation
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.
The go compiler should emit an end of prologue flag in debug_line, this shouldn't matter at all.
You're correct, it should but it isn't for this particular sequence. Needs to be fixed upstream. |
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.
Ok.
The ppc64le machine keeps timing out, but the |
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.
lgtm
If you look at the logs you'll see that a lot of the time is actually spent downloading and installing updates as well as programs we need for the script (jq, gcc, etc). Maybe we should make a docker image that is already up to date and has the things we need installed. |
PIE tests (tests on binaries built with PIE mode) on ppc64le port were having issues such as not matching expected patterns as in non PIE mode while stepping and not stepping into functions as expected creating errors due to which these tests were skipped on PIE mode
These problems were occurring due to the special prologue emitted on ppc64le to deal with the TOC register or R2
In some cases we had to modify the expected line numbers while stepping
and in some other cases where the breakpoint was set in the prologue instruction even before function entry as a result of which the breakpoint was deemed void and the program control was not entering inside the function we had to modify delve to recognize these patterns to appropriately skip the special prologue and move the breakpoint a few instructions later so that it was set at the right location and the breakpoint was actually hit.
Very soon we will add a change to the Go runtime as well to emit DWARF attributes to recognize such situations so that Delve can recognize this pattern with ease.
For now the current change in Delve fixes the issue and the tests pass.