Bug 112644
Summary: | MC crashes on import of large syntax files | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Leonard den Ottolander <leonard-rh-bugzilla> | ||||
Component: | mc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
URL: | https://savannah.gnu.org/patch/?func=detailitem&item_id=1628 | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2004-02-09 17:21:51 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
Leonard den Ottolander
2003-12-25 22:29:23 UTC
Created attachment 96699 [details]
Fixes segfault that happens on import of large syntax file
Duh. Thought the attached patch actually fixed the problem. The only thing that happened however was that the php.syntax file was reverted to it's old state when I upgraded the package ;-). So the problem is still there. What does work is increasing the size of MAX_WORDS_PER_CONTEXT to something like 4096. This is enough for the php.syntax file I submitted in bug #112645. Something like this should do: --- mc-4.6.0/edit/syntax.c.000 2002-12-15 19:55:53.000000000 +0100 +++ mc-4.6.0/edit/syntax.c 2003-12-26 01:06:51.000000000 +0100 @@ -42,7 +42,7 @@ #define UNKNOWN_FORMAT "unknown" -#define MAX_WORDS_PER_CONTEXT 1024 +#define MAX_WORDS_PER_CONTEXT 4096 #define MAX_CONTEXTS 128 #define RULE_ON_LEFT_BORDER 1 I added the above patch and a patch for the syntax file to a home built rpm, and thus verified that it works. Could the increase of MAX_WORDS_PER_CONTEXT to 4096 be applied to the update that will probably be released one of these days? (And maybe the syntax file as well?) The http://bugzilla.redhat.com/bugzilla/attachment.cgi?id=96699&action=view patch is buggy and the latter is just a hack. I chose to fix the former patch. mc-4.6.0-8.3 is builting ATM and will go to FC1 updates testing tonight. That the patch is buggy I already mentioned in comment 2. But you are going to try to fix that one? Sure raising MAX_WORDS_PER_CONTEXT to 4096 is a hack, but since the code was not setup to allocate memory dynamically it's just more usable to increase it to that value. But if you want to make this patch work that of course is much neater solution. The large php syntax file might come in handy testing ;) . By the way, could you please push 8.1 to the main update tree and get out a security announcement? This has not happened yet for Fedora Core so I presume many people are still running a vulnerable 6. Last version of the patch (mc-4.6.0-8.4) seems to be working correctly. Thanks. I submitted this patch at https://savannah.gnu.org/patch/?func=detailitem&item_id=1628 . Maybe you could contact the upstream maintainer about this? Shouldn't alloc_words_per_context += 1024; in hunk #5 read alloc_words_per_context += MAX_WORDS_PER_CONTEXT; ? Fixed in mc-4.6.0-8.4. Closing ERRATA. |