https://bugs.openldap.org/show_bug.cgi?id=9306

          Issue ID: 9306
           Summary: clang UndefinedBehaviorSanitizer report
           Product: LMDB
           Version: 0.9.24
          Hardware: x86_64
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: normal
          Priority: ---
         Component: liblmdb
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Hello. 

We using LMDB from Golang application. 
Clang compiler with flag "-fsanitize=undefined" shows next report:


mdb.c:7544:26: runtime error: member access within misaligned address
0x00d24759d53a for type 'MDB_page' (aka 'struct MDB_page'), which requires 8
byte alignment
0x00d24759d53a: note: pointer points here
 00 00  00 01 c4 49 00 01 00 00  00 00 00 00 52 00 20 00  20 00 6a 01 2e 01 f2
00  4a 00 9e 00 74 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mdb.c:7544:26 in
mdb.c:7544:26: runtime error: member access within misaligned address
0x00d24759d546 for type 'union (anonymous union at mdb.c:826:2)', which
requires 4 byte alignment
0x00d24759d546: note: pointer points here
 00 00 52 00 20 00  20 00 6a 01 2e 01 f2 00  4a 00 9e 00 74 00 c8 00  20 00 00
00 00 00 00 00  21 00
             ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mdb.c:7544:26 in
mdb.c:7544:26: runtime error: member access within misaligned address
0x00d24759d546 for type 'struct (anonymous struct at mdb.c:827:3)', which
requires 4 byte alignment
0x00d24759d546: note: pointer points here
 00 00 52 00 20 00  20 00 6a 01 2e 01 f2 00  4a 00 9e 00 74 00 c8 00  20 00 00
00 00 00 00 00  21 00
             ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mdb.c:7544:26 in
mdb.c:7544:26: runtime error: load of misaligned address 0x00d24759d546 for
type 'indx_t' (aka 'unsigned short'), which requires 4 byte alignment
0x00d24759d546: note: pointer points here
 00 00 52 00 20 00  20 00 6a 01 2e 01 f2 00  4a 00 9e 00 74 00 c8 00  20 00 00
00 00 00 00 00  21 00
             ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mdb.c:7544:26 in
mdb.c:7545:3: runtime error: member access within misaligned address
0x00d24759d53a for type 'MDB_page' (aka 'struct MDB_page'), which requires 8
byte alignment
0x00d24759d53a: note: pointer points here
 00 00  00 01 c4 49 00 01 00 00  00 00 00 00 52 00 20 00  20 00 6a 01 2e 01 f2
00  4a 00 9e 00 74 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mdb.c:7545:3 in
mdb.c:7545:3: runtime error: member access within misaligned address
0x00d24759d53a for type 'union (anonymous union at mdb.c:802:2)', which
requires 8 byte alignment
0x00d24759d53a: note: pointer points here
 00 00  00 01 c4 49 00 01 00 00  00 00 00 00 52 00 20 00  20 00 6a 01 2e 01 f2
00  4a 00 9e 00 74 00
              ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mdb.c:7545:3 in
mdb.c:7545:3: runtime error: load of misaligned address 0x00d24759d53a for type
'pgno_t' (aka 'unsigned long'), which requires 8 byte alignment
0x00d24759d53a: note: pointer points here
 00 00  00 01 c4 49 00 01 00 00  00 00 00 00 52 00 20 00  20 00 6a 01 2e 01 f2
00  4a 00 9e 00 74 00
              ^

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

Reply via email to