[pcre-dev] [Bug 1822] New: JIT is not AddressSanitizer-clean…

Startseite
Nachricht löschen
Autor: admin
Datum:  
To: pcre-dev
Neue Treads: [pcre-dev] [Bug 1822] JIT is not AddressSanitizer-clean on x86-64
Betreff: [pcre-dev] [Bug 1822] New: JIT is not AddressSanitizer-clean on x86-64
https://bugs.exim.org/show_bug.cgi?id=1822

            Bug ID: 1822
           Summary: JIT is not AddressSanitizer-clean on x86-64
           Product: PCRE
           Version: 10.21 (PCRE2)
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: tavianator@???
                CC: pcre-dev@???


Building PCRE2 with -fsanitize-address on x86-64 results in lots of warnings
like this:

../src/pcre2/src/sljit/sljitNativeX86_64.c:38:19: runtime error: store to
misaligned address 0x62100001cdac for type 'sljit_sw', which requires 8 byte
alignment
0x62100001cdac: note: pointer points here
06 0a 49 b9 be be be be be be be be be be be be be be be be be be be be be
be be be be be be be

Even though x86-64 is not a strict-alignment architecture (unless you set AC in
%eflags), gcc still requires that pointers be properly aligned. This could be
fixed by replacing things like

    *(sljit_sw*)inst = imm;


with

    memcpy(inst, &imm, sizeof(imm));


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