STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd
Hello, I am trying to compile the latest release of uw-imapd under Cygwin and Windows XP but the program crash after the first command. This is with the vanilla source from upstream. I know that it is not supposed to work very well but yesterday I did the same thing on a Windows Seven box and I did not have any problem. This is the output from ldd: [15:06][/tmp/imap-2007e/imapd] ldd ./imapd.exe ntdll.dll = /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c90) kernel32.dll = /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c80) cygwin1.dll = /usr/bin/cygwin1.dll (0x6100) ADVAPI32.DLL = /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL (0x77dd) RPCRT4.dll = /cygdrive/c/WINDOWS/system32/RPCRT4.dll (0x77e7) Secur32.dll = /cygdrive/c/WINDOWS/system32/Secur32.dll (0x77fe) (I am not using the SSL option) Here is the stackdump: Exception: STATUS_ACCESS_VIOLATION at eip=611097F3 eax=4D61696C ebx= ecx= edx=4D61696C esi=0001 edi=4D61696C ebp=0022B778 esp=0022B774 program=C:\cygwin\tmp\imap-2007e\imapd\imapd.exe, pid 1560, thread main cs=001B ds=0023 es=0023 fs=003B gs= ss=0023 Stack trace: Frame Function Args 0022B778 611097F3 (4D61696C, 0022BA3A, 00470CC9, 0001) 0022BA58 6113E916 (0022D000, 0022BA78, 00470CC6, 0022BB00) 0022BAE8 61114064 (0022BB00, 00470CC6, 008599A0, 4D61696C) 0022BF08 610BC826 (00469DC0, , , ) 0022BF38 00441A76 (0022BFC0, 00469DC0, , ) 0022C3C8 0040548A (, 00469546, 0708, 00869B90) 0022CD28 00407952 (0001, 008598C0, 008480E0, 8000) 0022CD98 61006E73 (, 0022CDD4, 61006720, 7FFDC000) End of stack trace Using GDB on a running program: [15:33][/tmp/imap-2007e/imapd] gdb ./imapd.exe GNU gdb 6.8.0.20080328-cvs (cygwin-special) [...] This GDB was configured as i686-pc-cygwin... (gdb) run Starting program: /tmp/imap-2007e/imapd/imapd.exe [New thread 2592.0x5cc] [New thread 2592.0x7c0] * PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] Pre-authenticated user dente bfmi246pc IMAP4rev1 2007e.404 at Wed, 2 Jun 2010 15:33:48 +0200 [New thread 2592.0x84c] aaa hhh Program received signal SIGSEGV, Segmentation fault. 0x611097f3 in strlen () from /usr/bin/cygwin1.dll (gdb) bt #0 0x611097f3 in strlen () from /usr/bin/cygwin1.dll #1 0x7c85ada0 in OutputDebugStringA () from /cygdrive/c/WINDOWS/system32/kernel32.dll #2 0x40010006 in ?? () #3 0x in ?? () (I have used aaa hhh as an example nonsensical comman, but I get the crash whatever I use as an input) Using GDB on a coredump ends with: #0 0x611097f3 in strlen () from C:\cygwin\bin\cygwin1.dll Now I am stuck ... Seeing that it is not a program guaranteed to work under cygwin I would not have asked on the mailing list, but for the fact that a) it is working under Win7 but not under WinXP and b) GDB seems to say that the problem is in the cygwin1.dll. Well, b) could just be me not being able to use GDB One more thing, I have made a search and I am pretty sure that there is only one cygwin1.dll on my system. Any pointer would be very much appreciated. Thanks, Davide D. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd
On Wed, Jun 02, 2010 at 03:46:11PM +0200, c...@tocaido.net wrote: Hello, I am trying to compile the latest release of uw-imapd under Cygwin and Windows XP but the program crash after the first command. This is with the vanilla source from upstream. I know that it is not supposed to work very well but yesterday I did the same thing on a Windows Seven box and I did not have any problem. This is the output from ldd: [15:06][/tmp/imap-2007e/imapd] ldd ./imapd.exe ntdll.dll = /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c90) kernel32.dll = /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c80) cygwin1.dll = /usr/bin/cygwin1.dll (0x6100) ADVAPI32.DLL = /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL (0x77dd) RPCRT4.dll = /cygdrive/c/WINDOWS/system32/RPCRT4.dll (0x77e7) Secur32.dll = /cygdrive/c/WINDOWS/system32/Secur32.dll (0x77fe) (I am not using the SSL option) Here is the stackdump: Exception: STATUS_ACCESS_VIOLATION at eip=611097F3 eax=4D61696C ebx= ecx= edx=4D61696C esi=0001 edi=4D61696C ebp=0022B778 esp=0022B774 program=C:\cygwin\tmp\imap-2007e\imapd\imapd.exe, pid 1560, thread main cs=001B ds=0023 es=0023 fs=003B gs= ss=0023 Stack trace: Frame Function Args 0022B778 611097F3 (4D61696C, 0022BA3A, 00470CC9, 0001) 0022BA58 6113E916 (0022D000, 0022BA78, 00470CC6, 0022BB00) 0022BAE8 61114064 (0022BB00, 00470CC6, 008599A0, 4D61696C) 0022BF08 610BC826 (00469DC0, , , ) 0022BF38 00441A76 (0022BFC0, 00469DC0, , ) 0022C3C8 0040548A (, 00469546, 0708, 00869B90) 0022CD28 00407952 (0001, 008598C0, 008480E0, 8000) 0022CD98 61006E73 (, 0022CDD4, 61006720, 7FFDC000) End of stack trace Using GDB on a running program: [15:33][/tmp/imap-2007e/imapd] gdb ./imapd.exe GNU gdb 6.8.0.20080328-cvs (cygwin-special) [...] This GDB was configured as i686-pc-cygwin... (gdb) run Starting program: /tmp/imap-2007e/imapd/imapd.exe [New thread 2592.0x5cc] [New thread 2592.0x7c0] * PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] Pre-authenticated user dente bfmi246pc IMAP4rev1 2007e.404 at Wed, 2 Jun 2010 15:33:48 +0200 [New thread 2592.0x84c] aaa hhh Program received signal SIGSEGV, Segmentation fault. 0x611097f3 in strlen () from /usr/bin/cygwin1.dll (gdb) bt #0 0x611097f3 in strlen () from /usr/bin/cygwin1.dll #1 0x7c85ada0 in OutputDebugStringA () from /cygdrive/c/WINDOWS/system32/kernel32.dll #2 0x40010006 in ?? () #3 0x in ?? () (I have used aaa hhh as an example nonsensical comman, but I get the crash whatever I use as an input) Using GDB on a coredump ends with: #0 0x611097f3 in strlen () from C:\cygwin\bin\cygwin1.dll Now I am stuck ... Seeing that it is not a program guaranteed to work under cygwin I would not have asked on the mailing list, but for the fact that a) it is working under Win7 but not under WinXP and b) GDB seems to say that the problem is in the cygwin1.dll. If it's actually dying in strlen() (which is debatable) then that wouldn't be a Cygwin problem. It would be a problem with a program sending garbage to strlen(). Unfortunately, you need to do quite a bit more debugging of the problem than just looking at a stack trace. I'd suggest setting breakpoints throughout the code and stepping around to see what function is dying. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd
cw wrote: I am trying to compile the latest release of uw-imapd under Cygwin and Windows XP but the program crash after the first command. This is with the vanilla source from upstream. I know that it is not supposed to work very well but yesterday I did the same thing on a Windows Seven box and I did not have any problem. [snip] GNU gdb 6.8.0.20080328-cvs (cygwin-special) [...] This GDB was configured as i686-pc-cygwin... (gdb) run Starting program: /tmp/imap-2007e/imapd/imapd.exe [New thread 2592.0x5cc] [New thread 2592.0x7c0] * PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] Pre-authenticated user dente bfmi246pc IMAP4rev1 2007e.404 at Wed, 2 Jun 2010 15:33:48 +0200 [New thread 2592.0x84c] aaa hhh Program received signal SIGSEGV, Segmentation fault. 0x611097f3 in strlen () from /usr/bin/cygwin1.dll (gdb) bt #0 0x611097f3 in strlen () from /usr/bin/cygwin1.dll #1 0x7c85ada0 in OutputDebugStringA () from /cygdrive/c/WINDOWS/system32/kernel32.dll #2 0x40010006 in ?? () #3 0x in ?? () [snip] Any pointer would be very much appreciated. This looks like the well known strlen(NULL) problem, it crashes on Solaris and I guess on Cygwin, does work on Linux. You'll have to patch UW-IMAP, which already has many uses of strlen() guarded. -- René Berber -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: STATUS_ACCESS_VIOLATION in strlen running a vanilla uw-imapd
I am sorry, this was completely my fault. I made a stupid syntax mistake while changing the source to configure the program and that was the cause of the problem. Sorry again. On Wed, 02 Jun 2010 10:04 -0400, Christopher Faylor cgf-use-the-mailinglist-ple...@cygwin.com wrote: On Wed, Jun 02, 2010 at 03:46:11PM +0200, c...@tocaido.net wrote: Hello, I am trying to compile the latest release of uw-imapd under Cygwin and Windows XP but the program crash after the first command. [] -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple