Bug 2242051
| Summary: | EMBOSS: incomplete pcre2 port is not working | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Samuel Ortion <samuel+fedora> | ||||
| Component: | EMBOSS | Assignee: | Tom "spot" Callaway <spotrh> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 38 | CC: | fweimer, spotrh | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | EMBOSS-6.6.0-26.fc38 EMBOSS-6.6.0-26.fc39 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2023-12-29 01:05:00 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 2137512 | ||||||
| Attachments: |
|
||||||
|
Description
Samuel Ortion
2023-10-04 05:35:24 UTC
Created attachment 1991946 [details]
GDB Segfault trace on water (the same on seqret)
The pcre2 port is faulty. The ovector handling was not changed:
diff -up EMBOSS-6.6.0/ajax/core/ajreg.c.pcre2 EMBOSS-6.6.0/ajax/core/ajreg.c
--- EMBOSS-6.6.0/ajax/core/ajreg.c.pcre2 2011-10-18 10:23:40.000000000 -0400
+++ EMBOSS-6.6.0/ajax/core/ajreg.c 2022-09-20 12:15:54.710050043 -0400
@@ -85,13 +85,13 @@ AjPRegexp ajRegCompC(const char* rexp)
AjPRegexp ret;
int options = 0;
int errpos = 0;
- const char *errptr = NULL;
- const unsigned char *tableptr = NULL;
+ const char *errptr = NULL;
+ pcre2_compile_context *tableptr = NULL;
AJNEW0(ret);
AJCNEW0(ret->ovector, AJREG_OVECSIZE);
ret->ovecsize = AJREG_OVECSIZE/3;
- ret->pcre = pcre_compile(rexp, options, &errptr, &errpos, tableptr);
+ ret->pcre = pcre2_compile((PCRE2_SPTR)rexp, PCRE2_ZERO_TERMINATED, options, &errptr, &errpos, tableptr);
if(!ret->pcre)
{
With pcre2, the ovector needs to be allocated using pcre2_match_data_create_from_patter and related functions.
I noticed this because GCC 14 correctly refuses to compile this code due to many type errors, and the crash you observe is proof that the errors are indeed warranted.
Well, as the person who did this work (poorly) the first time, I felt obliged to come clean it up. I reworked the pcre2 implementation and now seqret and water don't segfault. I don't have any immediate test cases I could run them through, but I suspect the bug reporter might. Please test the bodhi builds! FEDORA-2023-4583e503b9 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4583e503b9 FEDORA-2023-f5e1cc77de has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f5e1cc77de Thank you. The C compatibility issues are gone, at least. FEDORA-2023-4583e503b9 has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-4583e503b9` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-4583e503b9 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-f5e1cc77de has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f5e1cc77de` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f5e1cc77de See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-4583e503b9 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2023-f5e1cc77de has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report. |