-
Notifications
You must be signed in to change notification settings - Fork 45
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
Segfault when passing a before and after rpm #43
Comments
Another try, I've build another package locally with fedpkg mockbuild (python-gunicorn) and tried to run:
|
This is a really good find, totally a legit bug. I was able to quickly track down what was happening. In the metadata inspection, I compare the RPM name, vendor, license, and so on. Since you were comparing a Koji build package to a local build package, you did not have a Vendor tag in the locally built one. librpm was giving me NULL back when I asked for the header tag, and then I passed it to strcmp() and SIGSEGV. So I have expanded that test to see if the Vendor tag is NULL or not and report accordingly. You can have gained, lost, or modified the Vendor tag now. |
The Vendor tag may or may not be set depending on where you build a package. For packages built in the Fedora build system, they always get a Vendor tag. But if you build something locally, you probably don't have a Vendor tag. Account for this appropriately in the 'metadata' inspection. Also switch from using headerGetAsString() to headerGetString() to avoid unnecessary memory allocation and leaking.
…pminspect#43) The Vendor tag may or may not be set depending on where you build a package. For packages built in the Fedora build system, they always get a Vendor tag. But if you build something locally, you probably don't have a Vendor tag. Account for this appropriately in the 'metadata' inspection. Also switch from using headerGetAsString() to headerGetString() to avoid unnecessary memory allocation and leaking.
Hi David,
I experienced a segfault with rpminspect, here is my log:
The core dump from journalctl:
The "after build" python-gear package has been built outside of koji, via fedpkg mockbuild, this is a simple change:
I can run rpminspect on each the "before build" and "after build" w/o issue but when used together it segfault.
I'm able to run it on other packages w/o issue like:
The rpm I've built via buildmock is available here:
curl -kOL https://38.145.32.151/python3-gear-0.14.0-6.fc32.noarch.rpm
Thanks in advance for your help.
Fabien
The text was updated successfully, but these errors were encountered: