Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-4241

GNU-stack section should never be conditionally compiled out

    • Storage Engines 2018-08-13, Storage Engines 2018-08-27
    • v4.0

      In WT-4198 conditional compilation modes were added for the following preprocessed assembly files:

      The scope of this conditional compilation is too broad: the .note.GNU-stack section must always be emitted, since we still produce and link an object file for this TU whether.

      As written, the section may not be emitted depending on the value of the HAVE_NO_CRC32_HARDWARE. In the event that the section is not emitted, the resulting object file will not be tagged as not requiring an executable stack. As a result, any binary into which the object file is linked will not be marked as not requiring an executable stack.

      The solution is to move up the #endif that was added at the end of the file above the block responsible for injecting the section. I recommend adding a warning comment around the blocks to avoid this error in the future.

      This change should be backported to 4.0, or to any other branch where WT commit 96f004261d6336f81fbd0bc245e8aa07e7cc24ac is backported.

            keith.bostic@mongodb.com Keith Bostic (Inactive)
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            0 Vote for this issue
            5 Start watching this issue