Closed brong closed 13 years ago
I'm in the process of setting up the latest version of cyrus imap on an alpha, running True64. However when I start it I got an segmentation fault in ctl_cyrusdb almost immediately, see backtrace below.
>0 0x3ff805c13f8 in __nxm_thread_kill(0x3ffc01b1530, 0xb, 0x1, 0x3, 0x0, 0x0) in /usr/shlib/libpthread.so
/usr/shlib/libpthread.so
0x0, 0x0) in /usr/shlib/libpthread.so
0x0, 0x0) in /usr/shlib/libexc.so
/usr/shlib/libexc.so
0x0, 0x0) in /usr/shlib/libexc.so
0x0, 0x0) in /usr/shlib/libpthread.so
/usr/shlib/libc.so
0x11fff892d) in /usr/shlib/libc.so
str=0x11fff92c0="configdirectory") "mpool.c":178
data=0x140054500, table=0x14004a920) "hash.c":115
"config.c":103
0x11fff892d) in imap/ctl_cyrusdb
I also tried to run the hash test (compiled hash.c with -DTEST) and I got segmentation fault in the same routine.
ratatosk[alpha_dux50]$ uname -a OSF1 ratatosk.pdc.kth.se V5.0 1094 alpha ratatosk[alpha_dux50]$ cc -V Compaq C V6.4-214 (dtk) on Compaq Tru64 UNIX V5.0A (Rev. 1094) Compiler Driver V6.4-014 (dtk) cc Driver
/torkel
From: Rob Siemborski
when you say "in the same function" do you mean mpool_strdup() (the last cyrus specific routine?)
Yes.
I still get a coredump in mpool_strdup with 2.1.9. Compiling the hash test program gives me the following backtrace:
ratatosk[lib]$ cc -DHAVE_CONFIG_H -DTEST -I.. -o pelle hash.c mpool.c xmalloc.o hash.c: mpool.c: cc: Warning: mpool.c, line 151: In this statement, performing pointer arithmetic on a pointer to void or a pointer to function is not allowed. The compiler will treat the type as if it were pointer to char. (badptrarith) remain = p->size - (p->ptr - p->base); ------------------------^ cc: Warning: mpool.c, line 153: In this statement, performing pointer arithmetic on a pointer to void or a pointer to function is not allowed. The compiler will treat the type as if it were pointer to char. (badptrarith) if(remain < size || p->ptr > (p->size + p->base)) { ----------------------------------^ ratatosk[lib]$ ./pelle Segmentation fault (core dumped) ratatosk[lib]$ dbx ./pelle core dbx version 5.0 Type 'help' for help. Core file created by program "pelle"
signal Segmentation fault at >*[strcpy, 0x3ff800cf6a0] ldq_u t2, 0(a0) (dbx) where > 0 strcpy(0x120002458, 0x3200, 0x12000270c, 0x140000398, 0x1400000a0) [0x3ff800cf6a0] 1 mpool_strdup(0x1400000a0, 0x11fffbfe8, 0x120001a94, 0x140000398, 0x140002100) [0x120002720] 2 hash_insert(0x140000088, 0x11fffbf80, 0xffffffffffffffff, 0x140051d20, 0x14006e7e0) [0x120001a90] 3 main(0x0, 0xffffffffffffffff, 0x140051d20, 0xc8, 0x140004000) [0x120002288]
/torkel
From: torkel@pdc.kth.se Bugzilla-Id: 1322 Version: 2.1.x Owner: Ken Murchison