Dovecot 2.3.6 on Solaris10: build issues, segfaults

Timo Sirainen timo at sirainen.com
Mon Jul 22 16:16:02 EEST 2019


Ah, okay, I see. submission_max_mail_size should be defined as uoff_t instead of size_t in struct submission_settings and struct submission_settings.

> On 20 Jul 2019, at 1.47, Joseph Tam via dovecot <dovecot at dovecot.org> wrote:
> 
> 
> Looking further into this segfault at
> 
> 	settings-parser.c:setting_copy():1519
> 	*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 gmail.com>



More information about the dovecot mailing list