Skip to content
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

zend gdb detection fix on FreeBSD. #7756

Closed
wants to merge 1 commit into from

Conversation

devnexen
Copy link
Member

No description provided.

Zend/zend_gdb.c Show resolved Hide resolved
@devnexen
Copy link
Member Author

any chance it lands for the next 8.x releases otherwise ? :-)

@cmb69
Copy link
Contributor

cmb69 commented Dec 20, 2021

There are still more than two weeks till PHP 8.0.15RC1 will be tagged, so no need to hurry. :)

I cannot really comment on the patch, besides that I believe it to be good. Maybe the 8.0 RMs want to have a look; @sgolemon, @carusogabriel, what do you think?

@carusogabriel
Copy link
Contributor

@devnexen Would you explain to me this patch like I'm 5-years old, please?

It looks to me that this is making it possible to detect GDB on FreeBSD, but if you could elaborate a little bit more, we can have this on PHP 8.0, no problems!

Also, would this affect end users or only core contributors?

@devnexen
Copy link
Member Author

devnexen commented Dec 20, 2021

the actual code path is only fully valid on linux because :

  • while procfs is supported in some oses outside of linux, they do not store necessarily the infos in the same way (e.g. files are in binary format in solaris) nor the same amount (e.g. on netbsd there is no TracerPid "field").
  • procfs is only optional on freebsd, off by default, and only really useful when running the linux abi compatibility layer.

Thankfully there is native platform means to achieve the same goal, like the kinfo_file data, supported by BSD in general. So yes it is possible to detect GDB on these ;-) here I focused on FreeBSD only tough and at least that s a os ran in CI.

@cmb69
Copy link
Contributor

cmb69 commented Dec 20, 2021

Also, would this affect end users or only core contributors?

This is only for C developers, and mainly or even exclusively for JIT debugging.

@krakjoe
Copy link
Member

krakjoe commented Dec 21, 2021

Merged as 898da7b

@krakjoe krakjoe closed this Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants