[pcre-dev] [Bug 2247] New: build failure on m68k

Góra strony
Delete this message
Autor: admin
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 2247] New: build failure on m68k
https://bugs.exim.org/show_bug.cgi?id=2247

            Bug ID: 2247
           Summary: build failure on m68k
           Product: PCRE
           Version: 10.30 (PCRE2)
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: thomas.petazzoni@???
                CC: pcre-dev@???


Building for the m68k architecture fails with:


src/pcre2_intmodedep.h:818:14: error: size of array 'check_heapframe_size' is
negative
 typedef char check_heapframe_size[
              ^~~~~~~~~~~~~~~~~~~~


It fails for both the 16-bit and 32-bit variants. The 8-bit variant builds
fine.

The problem comes from the layout of the "struct heapframe" structure. The
check that verifies that it is a multiple of PCRE2_SIZE assumes that the eptr
pointer will be aligned on a 32-bit boundary.

However, the occu[] array starts at byte 0x32, i.e not aligned on a 32-bit
boundary, and has a size of 2 x 16-bit for the 16-bit variant, and 1 x 32-bit
for the 32-bit variant, which makes it end at byte 0x36. On most CPU
architectures, alignment constraints will ensure the eptr pointer will be
aligned on a 32-bit boundary and start at offset 0x38. But on m68k, this is not
an architecture requirement, and therefore the "eptr" pointer is stored at
offset 0x36, so the overall structure doesn't have a size multiple of 4.

I'm attaching a proposal to fix this issue.

--
You are receiving this mail because:
You are on the CC list for the bug.