Bug 59019 - UnDefine corrupts the list of defines
Summary: UnDefine corrupts the list of defines
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.10
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2016-02-17 16:51 UTC by Paul Spangler
Modified: 2016-03-03 19:36 UTC (History)
0 users



Attachments
Patch (546 bytes, patch)
2016-02-28 09:45 UTC, Christophe JAILLET
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Spangler 2016-02-17 16:51:24 UTC
UnDefine'ing a previously Define'd variable appears to corrupt ap_server_config_defines, causing future Defines to overwrite other variables.

Steps to Reproduce:

    Load the following conf snippet and try to start the server:

        Define ORIGINAL
        Define NEW
        UnDefine ORIGINAL
        Define REPLACEMENT

        <IfDefine ORIGINAL>
        Original should not have been defined
        </IfDefine>
        <IfDefine !REPLACEMENT>
        Replacement should have been defined
        </IfDefine>
        <IfDefine !NEW>
        New should have been defined
        </IfDefine>

Actual Results:

    The server fails to start because NEW is no longer defined.

Expected Results:

    The server starts.

Build Date & Hardware:

    64-bit Linux build of 2.4.10.

Additional Builds and Platforms:

    Reproduces in trunk builds and on Windows (2.4.7 64-bit).
Comment 1 Christophe JAILLET 2016-02-28 09:45:45 UTC
Created attachment 33605 [details]
Patch
Comment 2 Christophe JAILLET 2016-02-28 09:46:19 UTC
Confirmed,

could you try the attached patch?
Comment 3 Paul Spangler 2016-02-29 14:46:13 UTC
(In reply to Christophe JAILLET from comment #2)
> Confirmed,
> 
> could you try the attached patch?

Looks good to me. Tested 2.4.7 Windows 64-bit and trunk Linux 64-bit builds.
Comment 4 Christophe JAILLET 2016-02-29 16:14:42 UTC
Thx for testing,

r1732716 will be proposed for backport shortly.
Should be available in 2.4.19
Comment 5 Christophe JAILLET 2016-03-03 19:36:54 UTC
Will be part 2.4.19

See r1733278