Re: Solaris 10 make check core dumps

2015-01-12 Thread James

On 10/01/2015 17:16, James wrote:

On 08/01/2015 00:25, Brian Eliassen wrote:



Install prefix . : /usr/local


Oooh, I suggest you use /opt

./configure \
--prefix=${PREFIX} \
--sysconfdir=/etc/opt/${PREFIX} \
--localstatedir=/var/opt/${PREFIX} \
...

$ man -s 5 filesystem



Ha! I changed my concept of prefix as I wrote.  My apologies for 
needing a second attempt. I also divide up /var/ and /etc by project.


PREFIX=/opt/abcd

./configure \
--prefix=${PREFIX} \
--sysconfdir=/etc${PREFIX}/dovecot \
--localstatedir=/var${PREFIX}/dovecot \
...

The other way I think of prefix is more generally, if abcd is the 
chosen identifier the file prefix is /opt/abcd or /opt/${prefix}. 
This identifier is used as a prefix in several places like the SVR4 
package name and service name.


Re: Solaris 10 make check core dumps

2015-01-10 Thread James

On 08/01/2015 00:25, Brian Eliassen wrote:


I'm doing a standard build on Solaris 10 with Dovecot 2.2.15 without
anything fancy:

./configure
make
make check
make install

Configure output looks like this:
***
Install prefix . : /usr/local


Oooh, I suggest you use /opt

./configure \
--prefix=${PREFIX} \
--sysconfdir=/etc/opt/${PREFIX} \
--localstatedir=/var/opt/${PREFIX} \
...

$ man -s 5 filesystem



$ mdb test-http-auth core
Loading modules: [ libc.so.1 ld.so.1 ]

::stack

libc.so.1`strlen+0x50(29487, ffbffb00, ffbff43d, 0, 0, 0)
libc.so.1`vsnprintf+0x70(4f2c0, 10f, 29478, ffbffaf8, 10, ff1c7078)
t_noalloc_strdup_vprintf+0x3c(4f2c0, ffbffaf8, ffbffa2c, 1, 19, 0)
p_strdup_vprintf+0xc(4cb90, 29478, ffbffaf8, ff1c759c, 4cc38, 4cb8c)
t_strdup_printf+0x38(29478, 0, 0, 61fefeff, 80808080, 1010101)

Spot the zeros.  It's doing the equivalent of 'vsnprintf(s, %s, 0);'.

The check will run by changing the test code and not attempting to print 
nulls, patch file attached.  I've not thought about this deeply and this 
is no more than a hack to get the test to run, I didn't study the result.


On face value the core dump says dovecot has failed the test because its 
string functions don't take nulls, that is if dovecot ever sends them 
nulls which I can't say other than dovecot does run without dumping 
core.  If there is the possibility nulls need to be printed the dovecot 
functions in src/lib/strfuncs.c need fixing.









--- ../original/src/lib-http/test-http-auth.c   2014-09-24 20:34:27.0 
+0100
+++ src/lib-http/test-http-auth.c   2015-01-10 15:22:59.083365723 +
@@ -120,7 +120,7 @@
strcmp(chalo-scheme, 
chalt-scheme) == 0);
if (chalo-data == NULL || chalt-data 
== NULL) {

test_out(t_strdup_printf([%d]-data = %s,
-   index, 
str_sanitize(chalo-data, 80)),
+   index, 
str_sanitize(chalo-data == NULL ? NULL : chalo-data, 80)),
chalo-data == 
chalt-data);
} else {

test_out(t_strdup_printf([%d]-data = %s,
@@ -230,7 +230,7 @@
strcmp(out.scheme, test-scheme) == 0);
if (out.data == NULL || test-data == NULL) {
test_out(t_strdup_printf(-data = %s,
-   str_sanitize(out.data, 80)),
+   str_sanitize(out.data == NULL ? NULL 
: out.data, 80)),
out.data == test-data);
} else {
test_out(t_strdup_printf(-data = %s,
--- ../original/src/lib-http/test-http-request-parser.c 2014-06-02 
12:50:10.0 +0100
+++ src/lib-http/test-http-request-parser.c 2015-01-10 15:25:52.198118307 
+
@@ -269,7 +269,7 @@

if (payload == NULL || test-payload == NULL) {
test_out(t_strdup_printf(request-payload = 
%s,
-   str_sanitize(payload, 80)),
+   str_sanitize(payload == NULL ? NULL : 
payload, 80)),
payload == test-payload);
} else {
test_out(t_strdup_printf(request-payload = 
%s,
--- ../original/src/lib-imap/test-imap-url.c2014-07-03 10:44:49.0 
+0100
+++ src/lib-imap/test-imap-url.c2015-01-10 15:57:26.923109229 +
@@ -637,14 +637,14 @@
   strcmp(urlp-host_name, 
urlt-host_name) == 0);
}
if (urlp-userid == NULL || urlt-userid == NULL) {
-   test_out_quiet(t_strdup_printf(url-userid = 
%s, urlp-userid),
+   test_out_quiet(t_strdup_printf(url-userid = 
%s, urlp-userid == NULL ? NULL : urlp-userid),
   urlp-userid == urlt-userid);
} else {
test_out_quiet(t_strdup_printf(url-userid = 
%s, urlp-userid),
   strcmp(urlp-userid, 
urlt-userid) == 0);
}
if (urlp-auth_type == NULL || urlt-auth_type == NULL) 
{
-   test_out_quiet(t_strdup_printf(url-auth_type 
= %s, urlp-auth_type),
+   test_out_quiet(t_strdup_printf(url-auth_type 
= %s, urlp-auth_type == NULL ? NULL : urlp-auth_type),
   urlp-auth_type == 
urlt-auth_type);
} else {

Solaris 10 make check core dumps

2015-01-09 Thread Brian Eliassen

Hello everyone,

I'm doing a standard build on Solaris 10 with Dovecot 2.2.15 without  
anything fancy:


./configure
make
make check
make install

Configure output looks like this:
***
Install prefix . : /usr/local
File offsets ... : 64bit
I/O polling  : poll
I/O notifys  : none
SSL  : yes (OpenSSL)
GSSAPI . : no
passdbs  : static passwd passwd-file shadow pam checkpassword
 : -bsdauth -sia -ldap -sql -vpopmail
userdbs  : static prefetch passwd passwd-file checkpassword
 : -ldap -sql -vpopmail -nss
SQL drivers  :
 : -pgsql -mysql -sqlite
Full text search : squat
 : -lucene -solr
***

Everything works properly including the make until I try a make  
check at which time I receive the following failure.  It would appear  
that something in test-http-auth is most unhappy.


http auth challenges valid [0]: parse `Basic  
realm=WallyWorld' . : ok
http auth challenges valid [0]: [0]-scheme =  
Basic .. : ok

/bin/bash: line 1: 28057 Segmentation Fault  (core dumped) ./$bin
make[2]: *** [check-test] Error 1
make[2]: Leaving directory `/export/home/brian/software/dovecot-2.2.15/ 
src/lib-http'

make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/export/home/brian/software/dovecot-2.2.15/ 
src'

make: *** [check-recursive] Error 1

This creates: -rw---   1 root 1000 3523871 Jan  7 10:43 core

Can this be safely ignored and I can proceed to make install or  
should I look somewhere else for the problem?  Here is the mdb  
backtrace:


$ mdb test-http-auth core
Loading modules: [ libc.so.1 ld.so.1 ]
 ::stack
libc.so.1`strlen+0x50(29487, ffbffb00, ffbff43d, 0, 0, 0)
libc.so.1`vsnprintf+0x70(4f2c0, 10f, 29478, ffbffaf8, 10, ff1c7078)
t_noalloc_strdup_vprintf+0x3c(4f2c0, ffbffaf8, ffbffa2c, 1, 19, 0)
p_strdup_vprintf+0xc(4cb90, 29478, ffbffaf8, ff1c759c, 4cc38, 4cb8c)
t_strdup_printf+0x38(29478, 0, 0, 61fefeff, 80808080, 1010101)
test_http_auth_challenges_valid+0x150(29000, 29400, 0, 4f250, 4cbb8, 0)
test_run_funcs+0x24(4ca74, 1c00, ff1c7940, 4, ff312a00, ff13866c)
test_run+0xc(4ca74, ffbffc7c, ffbffc84, 4f030, ff310140, 0)
_start+0x5c(0, 0, 0, 0, 0, 0)

Any help would be greatly appreciated.

Brian