Dovecot 2.3.6 on Solaris10: build issues, segfaults

Joseph Tam jtam.home at
Sat Jul 20 03:47:44 EEST 2019

Looking further into this segfault at

 	*dest_size = *src_size;

*src_size points to type size_t (typedef unsigned long), a 4-byte
aligned value consistent with a 32-bit build.  This is mismatched with
declared type

 	(gdb) whatis src_size
 	type = const uoff_t *
 	(gdb) whatis uoff_t
 	type = unsigned long long
 	(gdb) p sizeof(uoff_t)
 	$1 = 8

resulting in the segfault when *src_size is dereferened.  The implied
condition of this code segment is typeof(uoff_t)==typeof(size_t) which
is clearly not the case.

I'm not sure how/if uoff_t is defined, but configure reports

 	checking for uoff_t... no
 	checking type of off_t... long long

The latter is weird, because if I compile and run using the same compiler flags

 	#include <stdio.h>
 	int main(void) { printf("%d %d\n",sizeof(long long),sizeof(off_t)); }

the output is "8 4".

Joseph Tam <jtam.home at>

More information about the dovecot mailing list