Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Conversation

@tomerd
Copy link
Collaborator

@tomerd tomerd commented Jun 7, 2022

motivation: catch up to fixes and improvments in underlying library

changes:

  • vendor latest version of libbacktrace
  • update vendoring script to exclude some new files that are not needed

motivation: catch up to fixes and improvments in underlying library

changes:
* vendor latest version of libbacktrace
* update vendoring script to exclude some new files that are not needed
@tomerd tomerd added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Jun 7, 2022
Copy link
Collaborator

@ianpartridge ianpartridge left a comment

Choose a reason for hiding this comment

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

LGTM.

Long time no speak @tomerd ! Hope you are doing well.

Copy link
Collaborator

@weissi weissi left a comment

Choose a reason for hiding this comment

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

Haven't reviewed all the code but updating this sounds like a good idea!

break;
case 1:
filename = "/proc/self/exe";
filename = getexecname ();
Copy link
Collaborator

Choose a reason for hiding this comment

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

@tomerd actually, this will regress the fix in #36 . I think you should probably apply that again.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be worth pinging the original author @ianlancetaylor. @ianlancetaylor if you have time, I'd be much appreciated if you'd let us know what you think about the changes (see explanation on the PR) in #36.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch @weissi thanks

Choose a reason for hiding this comment

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

Thanks for the ping. I'm puzzled by #36. That pull request says it is for Linux, but on Linux getexecname is not in libc as far as I know. The only system I know with getexecname is Solaris. And the libbacktrace configure script will only arrange to call getexecname on Solaris. In all other cases getexecname is #define'd to return NULL, so we will move on to the next case. Can you provide any more details on the failing case? Thanks.

Copy link
Collaborator

@weissi weissi Jun 9, 2022

Choose a reason for hiding this comment

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

@ianlancetaylor Thank you for looking into this. I apologise, the description of the PR w.r.t. getexecname() is indeed misleading if not wrong, let me run you through my thought process at the time:

Now with your new information that getexecname() only exists on Solaris (which in turn won't have /proc/*) I do agree that we indeed do not need to apply my changes to libbacktrace as long as we don't lose the actual fix. But that's in the Swift codebase so there's no risk we'll lose it.

Another way of phrasing this would be: On Linux, we'll have /proc/* but not getexecname(). On Solaris we'll have getexecname() but not /proc/* so their relative order doesn't matter a bit. I just didn't know that no Linuxes would have getexecname() and just did the change because it was easy.

@tomerd tl;dr your PR looks fine as is.

@tomerd tomerd merged commit c085164 into swift-server:main Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants