[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

glaubitz at physik dot fu-berlin.de gcc-bugzilla@gcc.gnu.org
Sat Nov 12 10:14:50 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498

--- Comment #8 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Eric Botcazou from comment #5)
> Can anyone print the value of mp in the debugger?

glaubitz@gcc202:~/openldap/tests$ gdb --args
/home/glaubitz/openldap/servers/slapd/slapd -Ta -d 0 -f
/home/glaubitz/openldap/tests/testrun/slapadd.conf -l
./testdata/test-ordered.ldif
GNU gdb (Debian 12.1-4) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "sparc64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/glaubitz/openldap/servers/slapd/slapd...
(gdb) r
Starting program: /home/glaubitz/openldap/servers/slapd/slapd -Ta -d 0 -f
/home/glaubitz/openldap/tests/testrun/slapadd.conf -l
./testdata/test-ordered.ldif

Program received signal SIGILL, Illegal instruction.
0xfff8000100e44320 in ?? ()
(gdb) c
Continuing.

Program received signal SIGBUS, Bus error.
0x00000100000ceda4 in mdb_node_add (mc=0x100004327b8, indx=<optimized out>,
key=0x7feffffe0a0, data=0x7feffffe090, pgno=0, flags=0) at
./../../../libraries/liblmdb/mdb.c:7366
7366            mp->mp_lower += sizeof(indx_t);
(gdb) p mp
$1 = (MDB_page *) 0x10000463caa
(gdb)


More information about the Gcc-bugs mailing list