Hi,
dconf-0.14.0 is broken, due to a bug in our uvm.
See the BUGS section of mmap(2).
The diff below fixes this crash.
Ok?
Ciao,
David
Program received signal SIGSEGV, Segmentation fault.
0x000000d5ea10d058 in dconf_shm_flag (name=0xd7eeeddc90 "user") at
dconf-shm.c:140
140 *shm = 1;
(gdb) bt full
#0 0x000000d5ea10d058 in dconf_shm_flag (name=0xd7eeeddc90 "user") at
dconf-shm.c:140
shm = (guint8 *) 0xd7ed16c000 <Address 0xd7ed16c000 out of bounds>
shmdir = (const gchar *) 0xd7ee169040 "/home/dcoppa/.cache/dconf"
filename = (gchar *) 0xd7f247e2c0 "/home/dcoppa/.cache/dconf/user"
fd = 15
__PRETTY_FUNCTION__ = "dconf_shm_flag"
#1 0x000000d5ea105bd4 in dconf_writer_change (writer=0xd7edd80860,
change=0xd7f32eea90, error=0xfffffffffffcbf10)
at dconf-writer.c:129
keys = (const gchar * const *) 0xd7eeedd400
values = (GVariant * const *) 0xd7eeedc780
prefix = (const gchar *) 0xd7f247e680
"/apps/gnome-mplayer/preferences/volume-softvol"
n_items = 1
#2 0x000000d5ea106cbc in method_call (connection=0xd7ef736030,
sender=0xd7eeeddc20 ":1.3",
object_path=0xd7ee168f00 "/ca/desrt/dconf/Writer/user",
interface_name=0xd7ee169dc0 "ca.desrt.dconf.Writer",
method_name=0xd7eeedce90 "Change", parameters=0xd7f32eecc0,
invocation=0xd7f07bf4c0, user_data=0xd7edd80860)
at service.c:277
change = (DConfChangeset *) 0xd7f32eea90
tmp = (GVariant *) 0xd7f32eeb50
error = (GError *) 0x0
args = (GVariant *) 0xd7f32eeb50
tag = (gchar *) 0x0
writer = (DConfWriter *) 0xd7edd80860
state = (DConfState *) 0xfffffffffffcc420
__PRETTY_FUNCTION__ = "method_call"
#3 0x000000d7f82be6cc in g_dbus_connection_get_stream () from
/usr/local/lib/libgio-2.0.so.3400.0
No symbol table info available.
#4 0x000000d7ef0838c0 in g_source_is_destroyed () from
/usr/local/lib/libglib-2.0.so.3400.0
No symbol table info available.
#5 0x000000d7ef0838c0 in g_source_is_destroyed () from
/usr/local/lib/libglib-2.0.so.3400.0
No symbol table info available.
Previous frame identical to this frame (corrupt stack?)
(gdb) bt
#0 0x000000d5ea10d058 in dconf_shm_flag (name=0xd7eeeddc90 "user") at
dconf-shm.c:140
#1 0x000000d5ea105bd4 in dconf_writer_change (writer=0xd7edd80860,
change=0xd7f32eea90, error=0xfffffffffffcbf10)
at dconf-writer.c:129
#2 0x000000d5ea106cbc in method_call (connection=0xd7ef736030,
sender=0xd7eeeddc20 ":1.3",
object_path=0xd7ee168f00 "/ca/desrt/dconf/Writer/user",
interface_name=0xd7ee169dc0 "ca.desrt.dconf.Writer",
method_name=0xd7eeedce90 "Change", parameters=0xd7f32eecc0,
invocation=0xd7f07bf4c0, user_data=0xd7edd80860)
at service.c:277
#3 0x000000d7f82be6cc in g_dbus_connection_get_stream () from
/usr/local/lib/libgio-2.0.so.3400.0
#4 0x000000d7ef0838c0 in g_source_is_destroyed () from
/usr/local/lib/libglib-2.0.so.3400.0
#5 0x000000d7ef0838c0 in g_source_is_destroyed () from
/usr/local/lib/libglib-2.0.so.3400.0
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/dconf/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- Makefile 29 Sep 2012 19:27:33 -0000 1.43
+++ Makefile 1 Nov 2012 10:35:19 -0000
@@ -11,7 +11,7 @@ GNOME_VERSION= 0.14.0
PKGNAME-main= ${DISTNAME}
PKGNAME-editor= dconf-editor-${GNOME_VERSION}
-REVISION-main= 1
+REVISION-main= 2
REVISION-editor=1
SHARED_LIBS+= dconf 1.0 # 1.0.0
Index: patches/patch-shm_dconf-shm_c
===================================================================
RCS file: patches/patch-shm_dconf-shm_c
diff -N patches/patch-shm_dconf-shm_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-shm_dconf-shm_c 1 Nov 2012 10:35:19 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Due to a limitation of the current vm system (see uvm(9)), mapping
+descriptors PROT_WRITE without also specifying PROT_READ is useless
+(results in a segmentation fault when first accessing the mapping).
+
+--- shm/dconf-shm.c.orig Wed Oct 31 22:06:47 2012
++++ shm/dconf-shm.c Wed Oct 31 22:10:58 2012
+@@ -134,7 +134,7 @@ dconf_shm_flag (const gchar *name)
+ *
+ * Using mmap() works everywhere.
+ */
+- shm = mmap (NULL, 1, PROT_WRITE, MAP_SHARED, fd, 0);
++ shm = mmap (NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ g_assert (shm != MAP_FAILED);
+
+ *shm = 1;