MLDonkey Forum Index
Homepage •  Bugs •  Tasks •  Patches •  SF.net Project Page •  ChangeLog •  German forum •  Links •  Wiki •  Downloads
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Solaris 11: segfaults on start

 
Post new topic   Reply to topic    MLDonkey Forum Index -> Alternative platforms
View previous topic :: View next topic  
Author Message
tokudan
neophyte


Joined: 02 Apr 2012
Posts: 2

PostPosted: Mon Apr 02, 2012 12:04 pm    Post subject: Solaris 11: segfaults on start Reply with quote

Hello,
I'm trying to run mldonkey on Solaris 11 with little success.
I have compiled mldonkey using the following command line with no error messages that caught my eyes.
Code:
./configure --prefix=/opt/mldonkey-3.1.0 --disable-donkey --disable-gui
make -j2
make install


Starting mldonkey always results in a segfault with a core dump:
Code:
$ time /opt/mldonkey/bin/mlnet
2012/04/02 13:56:16 [cO] Starting MLDonkey 3.1.0 ...
2012/04/02 13:56:16 [cO] Language EN, locale ASCII, ulimit for open files 256
2012/04/02 13:56:16 [cO] raised ulimit for open files from 256 to 65536
2012/04/02 13:56:16 [cO] MLDonkey is working in /data/download/mldonkey/.mldonkey

2012/04/02 13:56:16 [cO] creating new MLDonkey base directory in /data/download/mldonkey/.mldonkey

2012/04/02 13:56:16 [Gettext] Loading language resource mlnet_strings.EN_ASCII
2012/04/02 13:56:16 [cO] loaded language resource file
2012/04/02 13:56:16 [DNS] Resolving [tools] ...
Segmentation Fault (core dumped)

real    0m1.059s
user    0m0.005s
sys     0m0.140s


Trussing this, I cannot see any clear cause for the segfault. Maybe you can help me identify what is going wrong?
Code:

execve("/opt/mldonkey-3.1.0/bin/mlnet", 0x08047E30, 0x08047E38)  argc = 1
sysinfo(SI_MACHINE, "i86pc", 257)      = 6
mmap(0x00000000, 32, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFA0000
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF90000
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF80000
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF70000
memcntl(0xFEFB7000, 32184, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
memcntl(0x08050000, 664616, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
resolvepath("/opt/mldonkey-3.1.0/bin/mlnet", "/opt/mldonkey-3.1.0/bin/mlnet", 1023) = 29
sysconfig(_CONFIG_PAGESIZE)         = 4096
stat64("/opt/mldonkey-3.1.0/bin/mlnet", 0x080479D0) = 0
open("/var/ld/ld.config", O_RDONLY)      Err#2 ENOENT
stat64("/lib/libz.so.1", 0x08047180)      = 0
resolvepath("/lib/libz.so.1", "/lib/libz.so.1", 1023) = 14
open("/lib/libz.so.1", O_RDONLY)      = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEF90C30, 0x080471EC, 0x00000000) = 0
close(3)               = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF30000
memcntl(0xFEF40000, 6924, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
stat64("/lib/libbz2.so.1", 0x08047180)      Err#2 ENOENT
stat64("/usr/lib/libbz2.so.1", 0x08047180)   = 0
resolvepath("/usr/lib/libbz2.so.1", "/usr/lib/libbz2.so.1", 1023) = 20
open("/usr/lib/libbz2.so.1", O_RDONLY)      = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEF30548, 0x080471EC, 0x00000000) = 0
close(3)               = 0
memcntl(0xFEF00000, 5936, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
stat64("/lib/libnsl.so.1", 0x08047180)      = 0
resolvepath("/lib/libnsl.so.1", "/lib/libnsl.so.1", 1023) = 16
open("/lib/libnsl.so.1", O_RDONLY)      = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEF30AF0, 0x080471EC, 0x00000000) = 0
close(3)               = 0
memcntl(0xFEE70000, 75364, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
stat64("/lib/libsocket.so.1", 0x08047180)   = 0
resolvepath("/lib/libsocket.so.1", "/lib/libsocket.so.1", 1023) = 19
open("/lib/libsocket.so.1", O_RDONLY)      = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEF90DE8, 0x080471EC, 0x00000000) = 0
close(3)               = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEE40000
memcntl(0xFEE50000, 16524, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
stat64("/lib/libm.so.2", 0x08047180)      = 0
resolvepath("/lib/libm.so.2", "/lib/libm.so.2", 1023) = 14
open("/lib/libm.so.2", O_RDONLY)      = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEE404D8, 0x080471EC, 0x00000000) = 0
close(3)               = 0
memcntl(0xFEDD0000, 39388, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
stat64("/lib/libpthread.so.1", 0x08047180)   = 0
resolvepath("/lib/libpthread.so.1", "/lib/libpthread.so.1", 1023) = 20
open("/lib/libpthread.so.1", O_RDONLY)      = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEE40A68, 0x080471EC, 0x00000000) = 0
close(3)               = 0
stat64("/lib/libc.so.1", 0x08047180)      = 0
resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
open("/lib/libc.so.1", O_RDONLY)      = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEF90EE8, 0x080471EC, 0x00000000) = 0
close(3)               = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEC40000
memcntl(0xFEC50000, 222680, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEC30000
getcontext(0x08047830)
getrlimit(RLIMIT_STACK, 0x08047828)      = 0
getpid()               = 19852 [19809]
lwp_private(0, 1, 0xFEC32A40)         = 0x000001C3
setustack(0xFEC32AA0)
sigfillset(0xFEDBBB30)            = 0
sysi86(SI86FPSTART, 0xFEDBC4FC, 0x0000133F, 0x00001F80) = 0x00000001
brk(0x0854AD88)               = 0
brk(0x0854CD88)               = 0
brk(0x0854CD88)               = 0
brk(0x0864CD88)               = 0
brk(0x0864CD88)               = 0
brk(0x086CAD88)               = 0
brk(0x086CAD88)               = 0
brk(0x086CCD88)               = 0
brk(0x086CCD88)               = 0
brk(0x086CED88)               = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEC20000
llseek(0, 0, SEEK_CUR)            = 9486
brk(0x086CED88)               = 0
brk(0x086D0D88)               = 0
llseek(1, 0, SEEK_CUR)            = 9486
llseek(2, 0, SEEK_CUR)            = 9486
getpid()               = 19852 [19809]
getpid()               = 19852 [19809]
getpid()               = 19852 [19809]
getpid()               = 19852 [19809]
getrlimit(RLIMIT_NOFILE, 0x08047CDC)      = 0
time()                  = 1333367903
open("/system/volatile/tzsync", O_RDONLY)   = 3
mmap(0x00000000, 4, PROT_READ, MAP_SHARED, 3, 0) = 0xFEC10000
close(3)               = 0
open("/etc/default/init", O_RDONLY)      = 3
llseek(3, 0, SEEK_CUR)            = 0
llseek(3, 0, SEEK_SET)            = 0
fstat64(3, 0x08047AF0)            = 0
fstat64(3, 0x08047A00)            = 0
ioctl(3, TCGETA, 0x08047AA0)         Err#25 ENOTTY
read(3, " # _ _ G E N E R A T E D".., 1536)   = 824
llseek(3, 0, SEEK_CUR)            = 824
close(3)               = 0
brk(0x086D0D88)               = 0
brk(0x086D2D88)               = 0
open("/usr/share/lib/zoneinfo/Europe/Berlin", O_RDONLY) = 3
fstat64(3, 0x08047BE0)            = 0
read(3, " T Z i f 2\0\0\0\0\0\0\0".., 2311)   = 2311
close(3)               = 0
schedctl()               = 0xFEC06000
sigaction(SIGINT, 0x08047C0C, 0x08047C6C)   = 0
sigaction(SIGTERM, 0x08047C0C, 0x08047C6C)   = 0
stat64("/data/download/mldonkey/.mldonkey/installer.ini.tmp", 0x08047C80) Err#2 ENOENT
open64("/data/download/mldonkey/.mldonkey/installer.ini", O_RDONLY) Err#2 ENOENT
getcwd("/data/download/mldonkey/.mldonkey", 4096) = 0
stat64("/data/download/mldonkey/.mldonkey/downloads.ini", 0x08047CA4) Err#2 ENOENT
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 54)   = 54
getrlimit(RLIMIT_NOFILE, 0x08047D0C)      = 0
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 78)   = 78
getrlimit64(RLIMIT_NOFILE, 0x08047D08)      = 0
setrlimit64(RLIMIT_NOFILE, 0x08047D18)      = 0
getrlimit(RLIMIT_NOFILE, 0x08047D0C)      = 0
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 72)   = 72
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 82)   = 82
stat64("/data/download/mldonkey/.mldonkey", 0x08047CA4) = 0
stat64("/data/download/mldonkey/.mldonkey/downloads.ini", 0x08047CA4) Err#2 ENOENT
write(2, "\n", 1)            = 1
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 100)   = 100
stat64("/data/download/mldonkey/.mldonkey", 0x08047C88) = 0
stat64("/data/download/mldonkey/.mldonkey", 0x08047C80) = 0
open64("/data/download/mldonkey/.mldonkey/tmp_zgsxbvy_mld.tmp", O_WRONLY|O_CREAT, 0600) = 3
write(3, " m l d o n k e y   a c c".., 47)   = 47
close(3)               = 0
unlink("/data/download/mldonkey/.mldonkey/tmp_zgsxbvy_mld.tmp") = 0
chdir("/data/download/mldonkey/.mldonkey")   = 0
open64("mlnet_strings.EN_ASCII", O_RDONLY)   = 3
fcntl(3, F_SETFD, 0x00000001)         = 0
brk(0x086D2D88)               = 0
brk(0x086D4D88)               = 0
llseek(3, 0, SEEK_CUR)            = 0
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 79)   = 79
read(3, 0x086D23EC, 4096)         = 0
close(3)               = 0
brk(0x086D4D88)               = 0
brk(0x086F4D88)               = 0
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 55)   = 55
uname(0x0804680F)            = 1
stat64("/dev/null", 0x08047CA4)         = 0
access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ASCII.bt", R_OK) Err#2 ENOENT
access("/usr/lib/iconv/UTF-8%ASCII.so", R_OK)   Err#2 ENOENT
open("/usr/lib/iconv/alias", O_RDONLY)      = 3
fstat64(3, 0x08047B70)            = 0
mmap(0x00000000, 8733, PROT_READ, MAP_SHARED, 3, 0) = 0xFEC00000
close(3)               = 0
munmap(0xFEC00000, 8733)         = 0
access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%646.bt", R_OK) Err#2 ENOENT
access("/usr/lib/iconv/UTF-8%646.so", R_OK)   = 0
stat64("/usr/lib/iconv/UTF-8%646.so", 0x080471E0) = 0
resolvepath("/usr/lib/iconv/UTF-8%646.so", "/usr/lib/iconv/UTF-8%646.so", 1023) = 27
open("/usr/lib/iconv/UTF-8%646.so", O_RDONLY)   = 3
mmapobj(3, MMOBJ_INTERPRET, 0xFEC200B8, 0x0804724C, 0x00000000) = 0
close(3)               = 0
memcntl(0xFEBF0000, 2152, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
munmap(0xFEBF0000, 7141)         = 0
munmap(0xFEC01000, 3108)         = 0
open64("mlnet_tmp/tmp_jryghgg_mld.tmp", O_WRONLY|O_CREAT, 0600) = 3
write(3, " m l d o n k e y   a c c".., 47)   = 47
close(3)               = 0
unlink("mlnet_tmp/tmp_jryghgg_mld.tmp")      = 0
stat64("mlnet.pid", 0x08047CA4)         Err#2 ENOENT
stat64("config_files_space.tmp", 0x08047CA4)   Err#2 ENOENT
getpid()               = 19852 [19809]
getpid()               = 19852 [19809]
sysinfo(SI_HOSTNAME, "tools", 256)      = 6
time()                  = 1333367903
write(2, " 2 0 1 2 / 0 4 / 0 2   1".., 48)   = 48
open("/etc/netconfig", O_RDONLY)      = 3
fstat64(3, 0x08044F90)            = 0
fstat64(3, 0x08044EA0)            = 0
ioctl(3, TCGETA, 0x08044F40)         Err#25 ENOTTY
read(3, " #\n #   C o p y r i g h".., 1536)   = 1321
read(3, 0x086F3A14, 1536)         = 0
llseek(3, 0, SEEK_CUR)            = 1321
llseek(3, 0, SEEK_SET)            = 0
read(3, " #\n #   C o p y r i g h".., 1536)   = 1321
read(3, 0x086F3A14, 1536)         = 0
llseek(3, 0, SEEK_CUR)            = 1321
close(3)               = 0
open("/dev/udp", O_RDONLY)         = 3
ioctl(3, SIOCGLIFNUM, 0x08045470)      = 0
close(3)               = 0
open("/dev/udp", O_RDONLY)         = 3
ioctl(3, SIOCGLIFNUM, 0x08045470)      = 0
close(3)               = 0
getuid()               = 1000 [1000]
mmap(0x00010000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEBF0000
getuid()               = 1000 [1000]
getuid()               = 1000 [1000]
open64("/system/volatile/name_service_door", O_RDONLY) = 3
fcntl(3, F_SETFD, 0x00000001)         = 0
door_info(3, 0xFEDB1F14)         = 0
door_call(3, 0x08045240)         = 0
open("/etc/default/nss", O_RDONLY)      = 4
fstat64(4, 0x08045260)            = 0
fstat64(4, 0x08045170)            = 0
ioctl(4, TCGETA, 0x08045210)         Err#25 ENOTTY
read(4, " #   i d e n t\t " % Z %".., 1536)   = 1224
read(4, 0x086F4294, 1536)         = 0
llseek(4, 0, SEEK_CUR)            = 1224
close(4)               = 0
    Incurred fault #6, FLTBOUNDS  %pc = 0x08346C31
      siginfo: SIGSEGV SEGV_MAPERR addr=0x08346C31
    Received signal #11, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x08346C31
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 610

PostPosted: Wed Apr 04, 2012 2:22 pm    Post subject: Reply with quote

Can you run it under debugger (preferably gdb) or extract the stack trace from the core file?
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
tokudan
neophyte


Joined: 02 Apr 2012
Posts: 2

PostPosted: Wed Apr 04, 2012 10:29 pm    Post subject: Reply with quote

This is the output when run under gdb. I have shortened the output a bit as there are a lot of lines similar to this one, only containing a "??":
Code:

#3  0x08047cb8 in ?? ()

If the full output would be helpful, I can post ot, of course.

Code:

Script started on Thu Apr 05 00:21:38 2012
bash-4.1$ file /opt/mldonkey-3.1.0/bin/mlnet
/opt/mldonkey-3.1.0/bin/mlnet:  ELF 32-bit LSB executable 80386 Version 1 [SSE2 MMX CMOV FPU], dynamically linked, not stripped
bash-4.1$ gdb /opt/mldonkey-3.1.0/bin/mlnet
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11"...
(gdb) run
Starting program: /opt/mldonkey-3.1.0/bin/mlnet
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
2012/04/05 00:21:48 [cO] Starting MLDonkey 3.1.0 ...
2012/04/05 00:21:48 [cO] Language EN, locale ASCII, ulimit for open files 256
2012/04/05 00:21:48 [cO] raised ulimit for open files from 256 to 65536
2012/04/05 00:21:48 [cO] MLDonkey is working in /data/download/mldonkey/.mldonkey

2012/04/05 00:21:48 [cO] creating new MLDonkey base directory in /data/download/mldonkey/.mldonkey

2012/04/05 00:21:48 [Gettext] Loading language resource mlnet_strings.EN_ASCII
2012/04/05 00:21:48 [cO] loaded language resource file
2012/04/05 00:21:48 [DNS] Resolving [tools] ...

Program received signal SIGSEGV, Segmentation fault.
0x08349e71 in MD4Transform (state=0x8047d00, block=Unhandled dwarf expression opcode 0x9f
) at src/utils/lib/md4.c:263
263     src/utils/lib/md4.c: No such file or directory.
        in src/utils/lib/md4.c
(gdb) thread apply all bt
[New LWP 1]

Thread 1 (LWP 1):
#0  0x08349e71 in MD4Transform (state=0x8047d00, block=Unhandled dwarf expression opcode 0x9f
) at src/utils/lib/md4.c:263
#1  0x0834a5da in MD4Update (context=0x8047d00, input=0x8047cb8 "", inputLen=8) at src/utils/lib/md4.c:114
#2  0x08047d50 in ?? ()
#3  0x08047cb8 in ?? ()
#4  0x00000008 in ?? ()
#5  0x082fb108 in camlPervasives__$40_1143 ()
#6  0x0865afcc in ?? ()
#7  0x082fb108 in camlPervasives__$40_1143 ()
#8  0x00000008 in ?? ()
#9  0x08047d18 in ?? ()
#10 0x0865b314 in ?? ()
#11 0x082fb108 in camlPervasives__$40_1143 ()
#12 0x0865b490 in ?? ()
#13 0x0837bb90 in ?? ()
#14 0x08047d00 in ?? ()
#15 0x086570bc in ?? ()
#16 0x08047ce0 in ?? ()
#17 0x0834a6a7 in MD4Final (digest=0x5539f18b <Address 0x5539f18b out of bounds>, context=0x909f7610) at src/utils/lib/md4.c:148
#18 0x3f518dc0 in ?? ()
...
#64 0x24348904 in ?? ()
#65 0x082444c7 in camlGuiDecoding__to_gui_2528 ()
#66 0x00000008 in ?? ()
...
#84 0x47880846 in ?? ()
#85 0x08468b08 in camlCommonOptions__360 ()
#86 0x8808e8c1 in ?? ()
...
#154 0x04247489 in ?? ()
#155 0x08245489 in camlGuiEncoding__gui_send_1814 ()
#156 0x0489f88b in ?? ()
...
#337 0x2444890c in ?? ()
#338 0x08458b04 in camlXml_lexer__2 ()
#339 0xe8240489 in ?? ()
...
#347 0x7d8b5cec in ?? ()
#348 0x08458b0c in camlXml_lexer__2 ()
#349 0x89014f8d in ?? ()
...
#366 0xc84d8b0c in ?? ()
#367 0x08244489 in camlGuiDecoding__to_gui_2528 ()
#368 0x8910458b in ?? ()
...
#456 0x00000000 in ?? ()
(gdb)
(gdb) q
The program is running.  Exit anyway? (y or n) y
bash-4.1$
script done on Thu Apr 05 00:22:05 2012
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 610

PostPosted: Thu Apr 05, 2012 8:08 am    Post subject: Reply with quote

Show the full config/Makefile.config file used for compilation. Try editing that file(after ./configure) and set MD4ARCH to i386 or i686 and rerun make.

What is the processor on the host?

Also before running the program in gdb - set the breakpoing on MD4Transform (b MD4Transform) and see whether it crashes on the very first invocation of this function or not..
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 4001
Location: Germany

PostPosted: Sat May 12, 2012 1:07 pm    Post subject: Reply with quote

MLdonkey crashes in C function md4_unsafe_string called by
Code:
Md4.string ""

in commonUserDb.blank_password on startup.

I could reproduce the error using current OpenIndiana (SunOS openindiana
5.11 oi_151a4 i86pc i386 i86pc Solaris), ocaml-3.12.1 and gcc-4.6.2.
Unfortunately I am currently unable to provide a patch, but it seems the
md4 stuff is seriously broken on that platform.

It also seems that $MD4ARCH in Makefile is not used anymore as MLdonkey
compiles even when src/utils/lib/md4_i?86.s are removed.
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
mblakeman
neophyte


Joined: 30 Mar 2010
Posts: 5

PostPosted: Sun May 20, 2012 9:24 am    Post subject: Solaris 11: segfaults on start Reply with quote

I'm having the same problem running mldonkey on Solaris 11.

Has anyone had any luck identifying what the problem is?
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 610

PostPosted: Tue May 22, 2012 8:04 am    Post subject: Reply with quote

This looks like the solaris gcc optimization bug - adding printf to the code in question makes the bug go away, same when turning off SSE code generation. Also on solaris mldonkey always uses C routines for md4, after switching to asm routines - bug goes away too.
Hence the patch :
Code:

diff --git a/config/configure.in b/config/configure.in
index ec9ec03..2334e77 100644
--- a/config/configure.in
+++ b/config/configure.in
@@ -203,10 +203,10 @@ esac
 
 MD4ARCH=$arch
 case $host in
-  i386-pc-linux*|i386-*-*bsd*) MD4COMP=as; MD4ARCH=i386;;
-  i486-pc-linux*|i486-*-*bsd*) MD4COMP=as; MD4ARCH=i486;;
-  i586-pc-linux*|i586-*-*bsd*) MD4COMP=as; MD4ARCH=i586;;
-  i686-pc-linux*|i686-*-*bsd*) MD4COMP=as; MD4ARCH=i686;;
+  i386-pc-linux*|i386-*-*bsd*|i386-*-solaris*) MD4COMP=as; MD4ARCH=i386;;
+  i486-pc-linux*|i486-*-*bsd*|i486-*-solaris*) MD4COMP=as; MD4ARCH=i486;;
+  i586-pc-linux*|i586-*-*bsd*|i586-*-solaris*) MD4COMP=as; MD4ARCH=i586;;
+  i686-pc-linux*|i686-*-*bsd*|i686-*-solaris*) MD4COMP=as; MD4ARCH=i686;;
   i386-pc-mingw32*) MD4COMP=cc; MD4ARCH=i386;;
   i486-pc-mingw32*) MD4COMP=cc; MD4ARCH=i486;;
   i586-pc-mingw32*) MD4COMP=cc; MD4ARCH=i586;;

_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 4001
Location: Germany

PostPosted: Sun Jul 01, 2012 5:30 pm    Post subject: Reply with quote

Maybe this patch helps?
http://www.openbsd.org/cgi-bin/cvsweb/ports/net/mldonkey/stable/patches/patch-Makefile?rev=1.1

PS: wfm

PPS: committed to CVS: http://article.gmane.org/gmane.network.mldonkey.cvs/3467
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 610

PostPosted: Sun Jul 08, 2012 8:27 am    Post subject: Reply with quote

Why not enable assembler routines on opensolaris? And switch off optimization only for faulty compiler, not for all of them?
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 4001
Location: Germany

PostPosted: Sun Jul 08, 2012 9:32 am    Post subject: Reply with quote

ygrek wrote:
Why not enable assembler routines on opensolaris?

Your patch is still up for testing here.
ygrek wrote:
And switch off optimization only for faulty compiler, not for all of them?

Are you able to provide a complete list of faulty compilers?
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 610

PostPosted: Mon Jul 09, 2012 11:10 am    Post subject: Reply with quote

Ok, sounds reasonable.
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    MLDonkey Forum Index -> Alternative platforms All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Sourceforge.net Logo