Alan, I've seen reports recently about corrupted queries on 32-bit in this same thread.
I suspect there is a problem with g_strdup_vprintf or my usage of it. just guessing though On 06/04/2013 06:11 PM, Alan Hicks wrote: > Alas issues remain on FreeBSD, all appears well until I try to to deliver a > message with dbmail-deliver. > > Perhaps you might have some insight? The segfault happens when creating the > query "INSERT INTO %smessages(mailbox_idnr, physmessage_id, > unique_id,recent_flag, status) VALUES (%lu, %lu, '%s', 1, %d) %s" on line > 1280 > of dbmail-message.c and nothing appears unusual to me... > > (gdb) print frag > $1 = 0x28ccd124 "" > (gdb) print db_params.pfx > $2 = "dbmail_", '\0' <repeats 1016 times> > (gdb) print mailboxid > $3 = 119 > (gdb) print dbmail_message_get_physid(self) > $4 = 948591 > (gdb) print unique_id > $5 = 0xbfbfe14a "bce1b849b79333815d897b4268200568" > (gdb) print MESSAGE_STATUS_INSERT > $6 = MESSAGE_STATUS_INSERT > (gdb) print frag > $7 = 0x28ccd124 "" > (gdb) > > > and just before the segfault > > Breakpoint 4, db_query (c=0x28ccc370, > q=0x280c21b0 "INSERT INTO %smessages(mailbox_idnr, physmessage_id, > unique_id,recent_flag, status) VALUES (%lu, %lu, '%s', 1, %d) %s") at > dm_db.c:340 > 340 ResultSet_T r = NULL; > (gdb) next > 341 volatile gboolean result = FALSE; > (gdb) > 345 va_start(ap, q); > (gdb) > 346 va_copy(cp, ap); > (gdb) > 347 query = g_strdup_vprintf(q, cp); > (gdb) print q > $1 = 0x280c21b0 "INSERT INTO %smessages(mailbox_idnr, physmessage_id, > unique_id,recent_flag, status) VALUES (%lu, %lu, '%s', 1, %d) %s" > (gdb) print ap > $2 = 0xbfbfde78 "ÈR\016(w" > (gdb) print cp > $3 = 0xbfbfde78 "ÈR\016(w" > (gdb) print db_params.pfx > $4 = "dbmail_", '\0' <repeats 1016 times> > (gdb) nexti > 0x28096873 347 query = g_strdup_vprintf(q, cp); > (gdb) > 0x28096877 347 query = g_strdup_vprintf(q, cp); > (gdb) > 0x2809687a 347 query = g_strdup_vprintf(q, cp); > (gdb) > 0x2809687d 347 query = g_strdup_vprintf(q, cp); > (gdb) > > Program received signal SIGSEGV, Segmentation fault. > 0x28a0ac9c in strlen () from /lib/libc.so.7 > > > I'm still on 32-bit with gcc 4.2.1. After using the attached patches, all > compiles well though there are the expected warning: format '%lu' expects > type > 'long unsigned int', but argument 3 has type 'uint64_t'. > > dbmail-imapd appears to run successfully though has only minimal testing so > far. > > Any insight appreciated, > Alan > > > > _______________________________________________ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev > -- ________________________________________________________________ Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin * Premium Hosting Services and Web Application Consultancy * www.nfg.nl/i...@nfg.nl/+31.85.877.99.97 ________________________________________________________________ _______________________________________________ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev