Bug 494773
Summary: | Assertion rx->sublen >= (s - rx->subbeg) + i failed: file "regcomp.c" | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | George Greer <bugzilla> | ||||||
Component: | perl | Assignee: | Marcela Mašláňová <mmaslano> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 10 | CC: | kasal, lkundrak, mmaslano, rc040203, tcallawa | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
URL: | http://rt.perl.org/rt3/Ticket/Display.html?id=60508 | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-07-27 07:12:40 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: | |||||||||
Attachments: |
|
Description
George Greer
2009-04-08 03:22:04 UTC
George: -g does not cause the problem, it merely enables the assert. Therefore the error condition is most likely present also when -g is not in use, it is just not checked for. You're right; there's a trick to it: Perl's Configure script detects the -g and enables -DDEBUGGING itself, which is what Perl's assert() depends on. That would explain why my "gcc -E" with and without -g both had the assert in it. Fedora adds the -g so -DDEBUGGING is on, which is itself a useful thing other than this particular error aborting my script. Created attachment 345115 [details]
Test patch to assist Perl developers in locating problem.
Note: Patch is versus blead, not branch for perl-5.10.1 release.
Highly recommend this be reviewed by the Perl developers first, but it does fix the test cases and passes the Perl test suite.
Thanks for the patch. I'd rather see review from someone from p5p, who is familiar with utf8 and regexp code. This could be intrusive change. The patch looks as revert of change fae667d5a60f37538a5761795f7af2165c7d4fb0 which has to fix similar problem. The comment from git: "Regular expression changes to fix failing tests in XML::Twig and Mail::SpamAssassin. The breakages occured in changes #28785 and #29279." (In reply to comment #4) > Thanks for the patch. I'd rather see review from someone from p5p, who is > familiar with utf8 and regexp code. This could be intrusive change. Agreed. > The patch looks as revert of change fae667d5a60f37538a5761795f7af2165c7d4fb0 > which has to fix similar problem. The comment from git: > "Regular expression changes to fix failing tests in XML::Twig and > Mail::SpamAssassin. The breakages occured in changes #28785 and #29279." The git revision changes when the swap_match_buff() is called but my patch deletes the ->swap logic entirely. The problem is that when Perl re-enters the regex engine to handle utf8::SWASHNEW, the ->swap is not saved/restored so any result from the utf8 (Perl) code modifies the regex match that caused the utf8 swash to get built. Since ->swap isn't used much, it was easier to whack the whole concept and keep the pointer on the stack in the match function rather than play saved/restore games. The assert() in the subject line doesn't catch all of the cases where this happens since not all strings are shorter than the utf8 code's match offsets, though it is likely rare. Nobody on p5p commented, unfortunately, so I'll revise my patch based on some things I missed removing that was in the git revision you mentioned and resend it. Thanks for reminder. The patch will be applied in rawhide. Maybe in next update it will be added also in previous versions of Fedora. perl-5.10.0-82.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/perl-5.10.0-82.fc11 perl-5.10.0-82.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. |