Hello,
make check on Solaris 10 throws a segmentation fault.
The error is independent of the compiler (SunStudio/GCC) and processor architecture (SPARC/x86) and 32 or 64 bit binary.
Dovecot Version: 2.2.10 OS: Solaris 10/SPARC & x86
SunStudion Compiler cc: Sun C 5.10 SunOS_sparc Patch 141861-10 2012/11/07
GCC gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
The error occurs first in: src/lib-http/test-http-url Line 317/318: test_out(t_strdup_printf("url->user = %s", urlp->user), urlp->user == urlt->user);
(if commenting out these lines, then it segfaults just in the next test)
%make check <--- cut out lot of good output --->
http date invalid [42]: parse Sun Nov 6 08:49:37 0000 ............... : ok
http date invalid [42] ............................................... : ok
0 / 150 tests failed
http url valid [0]: http_url_parse(http://localhost) ................. : ok
http url valid [0]: url->host_name = localhost ....................... : ok
http url valid [0]: url->port = (unspecified) ........................ : ok
http url valid [0]: url->host_ip = (unspecified) ..................... : ok
/bin/bash: line 1: 28764 Segmentation Fault (core dumped) ./$bin
gmake[2]: *** [check-test] Error 1
gmake[2]: Leaving directory /data/obj/dovecot-2.2.10/src/lib-http' gmake[1]: *** [check-recursive] Error 1 gmake[1]: Leaving directory
/data/obj/dovecot-2.2.10/src'
gmake: *** [check-recursive] Error 1
% pstack /var/core/core.test-http-url.28764 core '/var/core/core.test-http-url.28764' of 28764: ./test-http-url ff122d50 strlen (3365e, ffbff6fc, ffbfecf9, 0, 0, 0) + 50 ff191c3c vsnprintf (4a638, 10e, 33650, ffbff6f8, 7ffffc00, 2400) + 6c 0002be0c t_strdup_printf (4a638, 2340, 48118, 2e, 48110, e) + 6c 0001635c ???????? (0, 0, 47800, 335c4, 80000000, 40000000) 0001924c test_run (fffd3268, 2cc00, ffbff94c, 2380, 2000, 47e94) + 6c 00016008 _start (0, 0, 0, 0, 0, 0) + 108
% dbx test-http-url /var/core/core.test-http-url.28884
(dbx) examine 0xff122d5c: strlen+0x005c: 0x98132101
(dbx) regs current frame: [1] g0-g1 0x00000000 0x00000000 0x00000000 0x0004a638 g2-g3 0x00000000 0x0004a3bc 0x00000000 0x0004a3b8 g4-g5 0x00000000 0x0004a3c8 0x00000000 0x00000270 g6-g7 0x00000000 0x00000000 0x00000000 0xff272a00 o0-o1 0x00000000 0x00000000 0x00000000 0xfffffaf0 o2-o3 0x00000000 0x00000000 0x00000000 0xffbff798 o4-o5 0x00000000 0x00000000 0x00000000 0x0000002b o6-o7 0x00000000 0xffbfe920 0x00000000 0xff18f498 l0-l1 0x00000000 0x00000073 0x00000000 0x00000000 l2-l3 0x00000000 0x00000000 0x00000000 0x00001000 l4-l5 0x00000000 0x00000000 0x00000000 0x00000000 l6-l7 0x00000000 0xff236c99 0x00000000 0x00000000 i0-i1 0x00000000 0x0003365e 0x00000000 0xffbff8dc i2-i3 0x00000000 0xffbfeed9 0x00000000 0x00000000 i4-i5 0x00000000 0x00000000 0x00000000 0x00000000 i6-i7 0x00000000 0xffbff7b0 0x00000000 0xff191c3c y 0x00000000 0x00000000 ccr 0x00000000 0xfe401005 pc 0x00000000 0xff122d50:strlen+0x50 ld [%o2], %o1 npc 0x00000000 0xff122d54:strlen+0x54 sethi %hi(0x1010000), %o4
(dbx) dis 0xff122d3c 0xff122d3c: strlen+0x003c: be,pn %icc,strlen+0xcc ! 0xff122dcc 0xff122d40: strlen+0x0040: btst 255, %o1 0xff122d44: strlen+0x0044: be,pn %icc,strlen+0xcc ! 0xff122dcc 0xff122d48: strlen+0x0048: inc %o2 0xff122d4c: strlen+0x004c: inc %o2 0xff122d50: strlen+0x0050: ld [%o2], %o1 0xff122d54: strlen+0x0054: sethi %hi(0x1010000), %o4 0xff122d58: strlen+0x0058: sethi %hi(0x80808000), %o5 0xff122d5c: strlen+0x005c: bset 257, %o4 0xff122d60: strlen+0x0060: bset 128, %o5
% truss -f ./test-http-url <--- cut out the beginning of output --->
28884: open("/platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1", O_RDONLY) = 3 28884: mmap(0x00010000, 9244, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xFF0E0000 28884: munmap(0xFF0E2000, 1052) = 0 28884: close(3) = 0 28884: getpid() = 28884 [28883] 28884: brk(0x0004A3A8) = 0 28884: brk(0x000543A8) = 0 28884: sysinfo(SI_HOSTNAME, "badile", 255) = 7 28884: getpid() = 28884 [28883] 28884: ioctl(1, TCGETA, 0xFFBFF664) = 0 28884: fstat64(1, 0xFFBFF580) = 0 http url valid [0]28884: write(1, " h t t p u r l v a l".., 18) = 18 : http_url_parse(http://localhost)28884: write(1, " : h t t p _ u r l _ p".., 34) = 34 ................. : ok 28884: write(1, " . . . . . . . . . . .".., 24) = 24 http url valid [0]28884: write(1, " h t t p u r l v a l".., 18) = 18 : url->host_name = localhost28884: write(1, " : u r l - > h o s t _".., 28) = 28 ....................... : ok 28884: write(1, " . . . . . . . . . . .".., 30) = 30 http url valid [0]28884: write(1, " h t t p u r l v a l".., 18) = 18 : url->port = (unspecified)28884: write(1, " : u r l - > p o r t ".., 27) = 27 ........................ : ok 28884: write(1, " . . . . . . . . . . .".., 31) = 31 http url valid [0]28884: write(1, " h t t p u r l v a l".., 18) = 18 : url->host_ip = (unspecified)28884: write(1, " : u r l - > h o s t _".., 30) = 30 ..................... : ok 28884: write(1, " . . . . . . . . . . .".., 28) = 28 28884: Incurred fault #6, FLTBOUNDS %pc = 0xFF122D50 28884: siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000 28884: Received signal #11, SIGSEGV [default] 28884: siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
% apptrace -f ./test-http-url <--- cut out the beginning of output --->
28897:-> test-http-url -> libc.so.1:int fputs(const char * = 0x33618 "url->host_ip = (unspecified)", FILE * = 0xfef2759c) : url->host_ip = (unspecified) 28897:<- test-http-url -> libc.so.1:fputs() = 0x1c 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x20, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x20 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0x2e, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0x2e 28897:-> test-http-url -> libc.so.1:size_t fwrite(const void * = 0x33e28, size_t = 0x1, size_t = 0x3, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:fwrite() = 0x3 28897:-> test-http-url -> libc.so.1:size_t fwrite(const void * = 0x33e2c, size_t = 0x1, size_t = 0x2, FILE * = 0xfef2759c) 28897:<- test-http-url -> libc.so.1:fwrite() = 0x2 28897:-> test-http-url -> libc.so.1:int __flsbuf(int = 0xa, FILE * = 0xfef2759c) ..................... : ok 28897:<- test-http-url -> libc.so.1:__flsbuf() = 0xa 28897:-> test-http-url -> libc.so.1:int vsnprintf(char * = 0x4a638 "", size_t = 0x10e, const char * = 0x33650 "url->user = %s", va_list = 0xffbff998)
apptrace: ./test-http-url: Segmentation Fault(Core dump)
Any help about this?
Cheers Thomas