* Re: weird samba problems, latest cygwin, samba 3.0.25b-4.2
@ 2007-12-02 16:30 jeff
[not found] ` <20071202162155.XNVY20104.mta10.adelphia.net@dual-xeon.weas el.com>
0 siblings, 1 reply; 10+ messages in thread
From: jeff @ 2007-12-02 16:30 UTC (permalink / raw)
To: cygwin
I updated samba to 3.0.25b-4.3 and the problem has gone away.
It sure was weird, but I am glad it is gone.
Thanks for all the help.
jeff
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* odd segfault with my c program using cygwin 1.7
[not found] ` <20071202162155.XNVY20104.mta10.adelphia.net@dual-xeon.weas el.com>
@ 2009-12-02 1:34 ` jeffunit
2009-12-02 6:35 ` Andy Koppe
0 siblings, 1 reply; 10+ messages in thread
From: jeffunit @ 2009-12-02 1:34 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
My program ran fine under cygwin 1.5 as well as many versions of
linux including
mandriva 2009, mandriva 2009.1 and mandriva 2010.0
When compiled with
gcc cal.c -o cal
and run with
cal 2009
I get a segmentation fault.
When I uncomment line 62, the program runs successfully.
I have had other problems with recent versions of cygwin 1.7 which
makes me suspect
some kind of error outside my programs.
thanks,
jeff
[-- Attachment #2: cygcheck.out --]
[-- Type: text/plain, Size: 16683 bytes --]
Cygwin Configuration Diagnostics
Current System Time: Tue Dec 01 17:28:15 2009
Windows XP Professional Ver 5.1 Build 2600 Service Pack 3
Path: C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\ATI Technologies\ATI.ACE\Core-Static
c:\cygwin\bin
c:\cygwin\usr\local\bin
u:\j\bin
C:\WINDOWS\system32\WindowsPowerShell\v1.0
C:\PROGRA~1\DISKEE~1\DISKEE~1\
C:\Program Files\Universal Extractor
C:\Program Files\Universal Extractor\bin
C:\Program Files\QuickTime\QTSystem\
Output from c:\cygwin\bin\id.exe
UID: 1003(jdeifik) GID: 513(None)
0(root) 544(Administrators) 545(Users) 513(None)
SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS
HOME = 'u:\j'
Path = 'C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;c:\cygwin\bin;c:\cygwin\usr\local\bin;u:\j\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\PROGRA~1\DISKEE~1\DISKEE~1\;C:\Program Files\Universal Extractor;C:\Program Files\Universal Extractor\bin;C:\Program Files\QuickTime\QTSystem\'
ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
APPDATA = 'U:\Documents and Settings\jdeifik\Application Data'
CLASSPATH = '.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip'
CLIENTNAME = 'Console'
CommonProgramFiles = 'C:\Program Files\Common Files'
COMPUTERNAME = 'PHENOMII'
ComSpec = 'C:\WINDOWS\system32\cmd.exe'
CVSROOT = 'u:\cvsroot'
FP_NO_HOST_CHECK = 'NO'
HOMEDRIVE = 'U:'
HOMEPATH = '\Documents and Settings\jdeifik'
Isuser = 'U:\Documents and Settings\jdeifik\LOCALS~1\Temp\{93D52C87-BDD8-4B78-BCD2-09D5FC34E8DA}\{BCE9F441-9027-4911-82E0-5FB28057897D}\_isuser.dll'
LOGONSERVER = '\\PHENOMII'
NUMBER_OF_PROCESSORS = '4'
OS = 'Windows_NT'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1'
PROCESSOR_ARCHITECTURE = 'x86'
PROCESSOR_IDENTIFIER = 'x86 Family 16 Model 4 Stepping 2, AuthenticAMD'
PROCESSOR_LEVEL = '16'
PROCESSOR_REVISION = '0402'
ProgramFiles = 'C:\Program Files'
PROMPT = '$P$G'
QTJAVA = 'C:\Program Files\Java\jre6\lib\ext\QTJava.zip'
SamDir = 'SINSTDIR'
SESSIONNAME = 'Console'
SystemDrive = 'C:'
SystemRoot = 'C:\WINDOWS'
TEMP = 'U:\DOCUME~1\jdeifik\LOCALS~1\Temp'
TMP = 'U:\DOCUME~1\jdeifik\LOCALS~1\Temp'
USERDOMAIN = 'PHENOMII'
USERNAME = 'jdeifik'
USERPROFILE = 'U:\Documents and Settings\jdeifik'
VBOX_INSTALL_PATH = 'C:\Program Files\Sun\VirtualBox\'
windir = 'C:\WINDOWS'
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygwin\setup
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\Cygwin
(default) = (unsupported type)
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\_Open_Source\Cygwin
(default) = (unsupported type)
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
(default) = '/cygdrive'
cygdrive flags = 0x00000022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
(default) = 'C:\cygwin'
flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
(default) = 'C:\cygwin/bin'
flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
(default) = 'C:\cygwin/lib'
flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
(default) = '\??\c:\cygwin'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
(default) = 'C:\cygwin'
obcaseinsensitive set to 1
Cygwin installations found in the registry:
System: Key: c5e39b7a9d22bafb Path: c:\cygwin
a: fd N/A N/A
c: hd NTFS 24003Mb 69% CP CS UN PA FC OCZ_Xp
d: cd N/A N/A
j: hd NTFS 715794Mb 43% CP CS UN PA FC sea_1.5a_mp3
k: hd NTFS 883865Mb 83% CP CS UN PA FC Hit_1_av
l: hd NTFS 715002Mb 52% CP CS UN PA FC sea_1_5a_os
m: hd NTFS 1430797Mb 75% CP CS UN PA FC Sea_1.5b_tv
p: cd N/A N/A
u: hd NTFS 70001Mb 54% CP CS UN PA FC Hit_1_User
w: fd N/A N/A
x: fd N/A N/A
y: fd N/A N/A
z: fd N/A N/A
c:\cygwin / system binary,auto
c:\cygwin\bin /usr/bin system binary,auto
c:\cygwin\lib /usr/lib system binary,auto
cygdrive prefix /cygdrive user binary,auto
Found: c:\cygwin\bin\awk.exe
-> c:\cygwin\bin\gawk.exe
Found: c:\cygwin\bin\bash.exe
Found: c:\cygwin\bin\cat.exe
Found: c:\cygwin\bin\cp.exe
Found: c:\cygwin\bin\cpp.exe
-> c:\cygwin\etc\alternatives\cpp
-> c:\cygwin\bin\cpp-4.exe
Not Found: crontab
Found: C:\WINDOWS\system32\find.exe
Found: c:\cygwin\bin\find.exe
Warning: C:\WINDOWS\system32\find.exe hides c:\cygwin\bin\find.exe
Found: c:\cygwin\bin\gcc.exe
-> c:\cygwin\etc\alternatives\gcc
-> c:\cygwin\bin\gcc-4.exe
Not Found: gdb
Found: c:\cygwin\bin\grep.exe
Found: c:\cygwin\bin\kill.exe
Found: c:\cygwin\bin\ld.exe
Found: c:\cygwin\bin\ls.exe
Found: c:\cygwin\bin\make.exe
Found: c:\cygwin\bin\mv.exe
Not Found: patch
Found: c:\cygwin\bin\perl.exe
Found: c:\cygwin\bin\rm.exe
Found: c:\cygwin\bin\sed.exe
Found: c:\cygwin\bin\ssh.exe
Found: c:\cygwin\bin\sh.exe
Found: c:\cygwin\bin\tar.exe
Found: c:\cygwin\bin\test.exe
Not Found: vi
Not Found: vim
704k 2007/12/18 c:\cygwin\bin\cygaspell-15.dll - os=4.0 img=1.0 sys=4.0
"cygaspell-15.dll" v0.0 ts=2007/12/18 3:39
61k 2009/03/02 c:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
"cygbz2-1.dll" v0.0 ts=2009/3/1 19:11
7k 2003/10/19 c:\cygwin\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
"cygcrypt-0.dll" v0.0 ts=2003/10/19 0:57
1147k 2009/11/05 c:\cygwin\bin\cygcrypto-0.9.8.dll - os=4.0 img=1.0 sys=4.0
"cygcrypto-0.9.8.dll" v0.0 ts=2009/11/5 9:36
703k 2007/12/17 c:\cygwin\bin\cygdb-4.2.dll - os=4.0 img=1.0 sys=4.0
"cygdb-4.2.dll" v0.0 ts=2007/12/17 3:58
943k 2007/12/17 c:\cygwin\bin\cygdb-4.5.dll - os=4.0 img=1.0 sys=4.0
"cygdb-4.5.dll" v0.0 ts=2007/12/17 5:12
1036k 2007/12/17 c:\cygwin\bin\cygdb_cxx-4.2.dll - os=4.0 img=1.0 sys=4.0
"cygdb_cxx-4.2.dll" v0.0 ts=2007/12/17 3:58
1296k 2007/12/17 c:\cygwin\bin\cygdb_cxx-4.5.dll - os=4.0 img=1.0 sys=4.0
"cygdb_cxx-4.5.dll" v0.0 ts=2007/12/17 5:12
118k 2008/05/09 c:\cygwin\bin\cygexpat-1.dll - os=4.0 img=1.0 sys=4.0
"cygexpat-1.dll" v0.0 ts=2008/5/8 21:03
22k 2009/09/29 c:\cygwin\bin\cygffi-4.dll - os=4.0 img=1.0 sys=4.0
"cygffi-4.dll" v0.0 ts=2009/9/14 8:50
40k 2009/03/01 c:\cygwin\bin\cygform-8.dll - os=4.0 img=1.0 sys=4.0
"cygform-8.dll" v0.0 ts=2009/2/28 22:32
43k 2009/11/20 c:\cygwin\bin\cygform-9.dll - os=4.0 img=1.0 sys=4.0
"cygform-9.dll" v0.0 ts=2009/11/20 11:14
44k 2009/09/29 c:\cygwin\bin\cyggcc_s-1.dll - os=4.0 img=1.0 sys=4.0
"cyggcc_s-1.dll" v0.0 ts=2009/9/14 8:42
20594k 2009/09/29 c:\cygwin\bin\cyggcj-9.dll - os=4.0 img=1.0 sys=4.0
"cyggcj-9.dll" v0.0 ts=2009/9/14 10:19
8562k 2009/09/29 c:\cygwin\bin\cyggcj-noncore-9.dll - os=4.0 img=1.0 sys=4.0
"cyggcj-noncore-9.dll" v0.0 ts=2009/9/14 10:20
2060k 2009/09/29 c:\cygwin\bin\cyggcj-tools-9.dll - os=4.0 img=1.0 sys=4.0
"cyggcj-tools-9.dll" v0.0 ts=2009/9/14 10:21
19k 2009/02/26 c:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm-4.dll" v0.0 ts=2009/2/25 23:58
8k 2009/02/26 c:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm_compat-4.dll" v0.0 ts=2009/2/25 23:58
11k 2009/09/29 c:\cygwin\bin\cyggij-9.dll - os=4.0 img=1.0 sys=4.0
"cyggij-9.dll" v0.0 ts=2009/9/14 10:21
315k 2009/06/06 c:\cygwin\bin\cyggmp-3.dll - os=4.0 img=1.0 sys=4.0
"cyggmp-3.dll" v0.0 ts=2009/6/6 4:23
24k 2009/09/29 c:\cygwin\bin\cyggomp-1.dll - os=4.0 img=1.0 sys=4.0
"cyggomp-1.dll" v0.0 ts=2009/9/14 8:51
24k 2009/06/23 c:\cygwin\bin\cyghistory6.dll - os=4.0 img=1.0 sys=4.0
"cyghistory6.dll" v0.0 ts=2009/6/23 5:20
25k 2009/07/06 c:\cygwin\bin\cyghistory7.dll - os=4.0 img=1.0 sys=4.0
"cyghistory7.dll" v0.0 ts=2009/7/5 7:45
274k 2009/11/22 c:\cygwin\bin\cygicons-0.dll - os=4.0 img=1.4 sys=4.0
"cygicons-0.dll" v0.0 ts=2009/11/21 18:35
981k 2009/05/30 c:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
"cygiconv-2.dll" v0.0 ts=2009/5/30 12:05
37k 2003/08/10 c:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0
"cygintl-2.dll" v0.0 ts=2003/8/10 14:50
31k 2005/11/20 c:\cygwin\bin\cygintl-3.dll - os=4.0 img=1.0 sys=4.0
"cygintl-3.dll" v0.0 ts=2005/11/19 18:04
31k 2009/04/03 c:\cygwin\bin\cygintl-8.dll - os=4.0 img=1.0 sys=4.0
"cygintl-8.dll" v0.0 ts=2009/4/2 18:15
6k 2009/09/29 c:\cygwin\bin\cygjvm.dll - os=4.0 img=1.0 sys=4.0
"cygjvm.dll" v0.0 ts=2009/9/14 10:21
5k 2009/11/27 c:\cygwin\bin\cyglsa.dll - os=4.0 img=1.0 sys=4.0
"cyglsa.dll" v0.0 ts=2009/11/27 6:39
9k 2009/11/27 c:\cygwin\bin\cyglsa64.dll - os=4.0 img=0.0 sys=5.2
98k 2009/03/16 c:\cygwin\bin\cygmagic-1.dll - os=4.0 img=1.0 sys=4.0
"cygmagic-1.dll" v0.0 ts=2009/3/16 9:32
21k 2009/03/01 c:\cygwin\bin\cygmenu-8.dll - os=4.0 img=1.0 sys=4.0
"cygmenu-8.dll" v0.0 ts=2009/2/28 22:31
25k 2009/11/20 c:\cygwin\bin\cygmenu-9.dll - os=4.0 img=1.0 sys=4.0
"cygmenu-9.dll" v0.0 ts=2009/11/20 11:13
211k 2009/06/06 c:\cygwin\bin\cygmp-3.dll - os=4.0 img=1.0 sys=4.0
"cygmp-3.dll" v0.0 ts=2009/6/6 4:23
269k 2009/06/07 c:\cygwin\bin\cygmpfr-1.dll - os=4.0 img=1.0 sys=4.0
"cygmpfr-1.dll" v0.0 ts=2009/6/7 14:10
66k 2009/03/01 c:\cygwin\bin\cygncurses++-8.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++-8.dll" v0.0 ts=2009/2/28 22:39
63k 2009/11/20 c:\cygwin\bin\cygncurses++-9.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++-9.dll" v0.0 ts=2009/11/20 11:25
237k 2009/03/01 c:\cygwin\bin\cygncurses-8.dll - os=4.0 img=1.0 sys=4.0
"cygncurses-8.dll" v0.0 ts=2009/2/28 22:28
198k 2009/11/20 c:\cygwin\bin\cygncurses-9.dll - os=4.0 img=1.0 sys=4.0
"cygncurses-9.dll" v0.0 ts=2009/11/20 11:10
11k 2009/03/01 c:\cygwin\bin\cygpanel-8.dll - os=4.0 img=1.0 sys=4.0
"cygpanel-8.dll" v0.0 ts=2009/2/28 22:30
13k 2009/11/20 c:\cygwin\bin\cygpanel-9.dll - os=4.0 img=1.0 sys=4.0
"cygpanel-9.dll" v0.0 ts=2009/11/20 11:12
217k 2009/11/10 c:\cygwin\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
"cygpcre-0.dll" v0.0 ts=2009/10/25 2:42
8k 2009/11/10 c:\cygwin\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0
"cygpcreposix-0.dll" v0.0 ts=2009/10/25 2:42
1543k 2008/07/03 c:\cygwin\bin\cygperl5_10.dll - os=4.0 img=1.0 sys=4.0
"cygperl5_10.dll" v0.0 ts=2008/6/30 9:06
22k 2002/06/09 c:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
"cygpopt-0.dll" v0.0 ts=2002/6/8 22:45
4k 2007/12/18 c:\cygwin\bin\cygpspell-15.dll - os=4.0 img=1.0 sys=4.0
"cygpspell-15.dll" v0.0 ts=2007/12/18 3:40
155k 2009/06/23 c:\cygwin\bin\cygreadline6.dll - os=4.0 img=1.0 sys=4.0
"cygreadline6.dll" v0.0 ts=2009/6/23 5:20
162k 2009/07/06 c:\cygwin\bin\cygreadline7.dll - os=4.0 img=1.0 sys=4.0
"cygreadline7.dll" v0.0 ts=2009/7/5 7:45
252k 2009/11/05 c:\cygwin\bin\cygssl-0.9.8.dll - os=4.0 img=1.0 sys=4.0
"cygssl-0.9.8.dll" v0.0 ts=2009/11/5 9:36
8k 2009/09/29 c:\cygwin\bin\cygssp-0.dll - os=4.0 img=1.0 sys=4.0
"cygssp-0.dll" v0.0 ts=2009/9/14 8:49
771k 2009/09/29 c:\cygwin\bin\cygstdc++-6.dll - os=4.0 img=1.0 sys=4.0
"cygstdc++-6.dll" v0.0 ts=2009/9/14 9:19
48k 2009/11/20 c:\cygwin\bin\cygtic-9.dll - os=4.0 img=1.0 sys=4.0
"cygtic-9.dll" v0.0 ts=2009/11/20 11:10
247k 2004/12/07 c:\cygwin\bin\cygtidy-0-99-0.dll - os=4.0 img=1.0 sys=4.0
"cygtidy-0-99-0.dll" v0.0 ts=2004/12/7 6:34
24k 2009/03/29 c:\cygwin\bin\cygwrap-0.dll - os=4.0 img=1.0 sys=4.0
"cygwrap-0.dll" v0.0 ts=2009/3/28 23:28
64k 2009/03/02 c:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
"cygz.dll" v0.0 ts=2009/3/1 17:33
2419k 2009/11/27 c:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
"cygwin1.dll" v0.0 ts=2009/11/27 6:38
Cygwin DLL version info:
DLL version: 1.7.0
DLL epoch: 19
DLL old termios: 5
DLL malloc env: 28
Cygwin conv: 181
API major: 0
API minor: 218
Shared data: 5
DLL identifier: cygwin1
Mount registry: 3
Cygwin registry name: Cygwin
Program options name: Program Options
Installations name: Installations
Cygdrive default prefix:
Build date: Fri Nov 27 15:38:37 CET 2009
Shared id: cygwin1S5
No Cygwin services found.
Cygwin Package Information
Last downloaded files to:
Last downloaded files from:
Package Version
_update-info-dir 00834-1
alternatives 1.3.30c-10
aspell 0.60.5-1
aspell-en 6.0.0-1
base-cygwin 2.0-1
base-files 3.8-4
base-passwd 3.1-1
bash 3.2.49-23
bc 1.06-2
binutils 2.19.51-1
bzip2 1.0.5-10
coreutils 7.0-2
crypt 1.1-1
csih 0.9.1-1
cygrunsrv 1.34-1
cygutils 1.4.1-1
cygwin 1.7.0-67
cygwin-doc 1.5-1
dash 0.5.5.1-2
diffutils 2.8.7-1
editrights 1.01-2
expat 2.0.1-1
file 5.00-3
findutils 4.5.4-1
gawk 3.1.7-1
gcc-core 3.4.4-999
gcc-g++ 3.4.4-999
gcc-java 3.4.4-999
gcc-mingw-core 20050522-1
gcc-mingw-g++ 20050522-1
gcc-mingw-java 20050522-1
gcc4 4.3.4-1
gcc4-core 4.3.4-1
gcc4-g++ 4.3.4-1
gcc4-java 4.3.4-1
gettext 0.17-11
grep 2.5.4-2
groff 1.19.2-2
gzip 1.3.12-2
ipc-utils 1.0-1
less 429-1
libaspell15 0.60.5-1
libbz2_1 1.0.5-10
libdb4.2 4.2.52.5-2
libdb4.5 4.5.20.2-2
libexpat1 2.0.1-1
libexpat1-devel 2.0.1-1
libffi4 4.3.4-1
libgcc1 4.3.4-1
libgcj-common 4.3.4-1
libgcj9 4.3.4-1
libgdbm4 1.8.3-20
libgmp3 4.3.1-3
libgomp1 4.3.4-1
libiconv2 1.13-10
libintl2 0.12.1-3
libintl3 0.14.5-1
libintl8 0.17-11
libmpfr1 2.4.1-4
libncurses-devel 5.7-16
libncurses8 5.5-10
libncurses9 5.7-16
libpcre0 8.00-1
libpopt0 1.6.4-4
libreadline6 5.2.14-12
libreadline7 6.0.3-2
libssp0 4.3.4-1
libstdc++6 4.3.4-1
libstdc++6-devel 4.3.4-1
libwrap0 7.6-20
login 1.10-10
make 3.81-2
man 1.6e-1
mingw-runtime 3.16-1
ncurses 5.7-16
openssh 5.3p1-1
openssl 0.9.8l-2
perl 5.10.0-5
python 2.5.2-1
rebase 3.0.1-1
run 1.1.12-10
sed 4.1.5-2
tar 1.22-1
tcltk 20080420-1
termcap 20050421-1
terminfo 5.7_20090228-10
terminfo0 5.5_20061104-10
texinfo 4.13-3
tidy 041206-1
time 1.7-2
tzcode 2009k-1
w32api 3.14-1
which 2.20-2
zlib 1.2.3-10
zlib-devel 1.2.3-10
zlib0 1.2.3-10
Use -h to see help about each section
[-- Attachment #3: cal.c --]
[-- Type: text/plain, Size: 3341 bytes --]
#include <stdio.h> /* printf */
#include <stdlib.h> /* exit */
#include <assert.h> /* assert */
static int number(char *str);
static void cal(int m, int y, char *p, int w);
static void pstr(char *str, int n);
static int jan1(int yr);
static const char dayw[] = {" S M Tu W Th F S"};
static const char *smon[]= {
"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December",
};
static char string[432];
int main(int argc, char *argv[])
{
int y, i, j;
int m;
if(argc < 2) {
printf("usage: cal [month] year\n");
exit(0);
}
if(argc == 2)
goto xlong;
/* print out just month */
m = number(argv[1]);
if(m<1 || m>12)
goto badarg;
y = number(argv[2]);
if(y<1 || y>9999)
goto badarg;
printf(" %s %u\n", smon[m-1], y);
printf("%s\n", dayw);
cal(m, y, string, 24);
for(i=0; i<6*24; i+=24) {
pstr(string+i, 24);
}
exit(0);
/* print out complete year */
xlong:
y = number(argv[1]);
if(y<1 || y>9999)
goto badarg;
printf("\n");
printf(" %u\n", y);
printf("\n");
for(i=0; i<12; i+=3) {
fprintf(stderr,"fred is your friend %d\n", i);
for(j=0; j<6*72; j++) {
//printf("joe %d\n", j);
string[j] = '\0';
}
fprintf(stderr,"bob 0\n");
printf(" %.3s", smon[i]);
printf(" %.3s", smon[i+1]);
printf(" %.3s\n", smon[i+2]);
printf("%s %s %s\n", dayw, dayw, dayw);
fprintf(stderr,"bob 1\n");
cal(i+1, y, string, 72);
cal(i+2, y, string+23, 72);
cal(i+3, y, string+46, 72);
fprintf(stderr,"bob 2\n");
for(j=0; j<6*72; j+=72) {
pstr(string+j, 72);
}
fprintf(stderr,"bob 2\n");
}
return 0;
badarg:
printf("Bad argument\n");
return 1;
}
static int number(char *str)
{
int n, c;
char *s;
n = 0;
s = str;
while((c = *s++)) {
if(c<'0' || c>'9')
return(0);
n = n*10 + c-'0';
}
return(n);
}
static void pstr(char *str, int n)
{
int i;
char *s;
s = str;
i = n;
while(i--)
if(*s++ == '\0')
s[-1] = ' ';
i = n+1;
while(i--)
if(*--s != ' ')
break;
s[1] = '\0';
printf("%s\n", str);
}
char mon[] = {
0,
31, 29, 31, 30,
31, 30, 31, 31,
30, 31, 30, 31,
};
static void cal(int m, int y, char *p, int w)
{
int d, i;
char *s;
s = p;
d = jan1(y);
mon[2] = 29;
mon[9] = 30;
switch((jan1(y+1)+7-d) % 7) {
/* non-leap year */
case 1: mon[2] = 28; break;
/* 1752 */
default: mon[9] = 19; break;
/* leap year */
case 2: ;
}
for(i=1; i<m; i++) {
d += mon[i];
}
d %= 7;
s += 3*d;
for(i=1; i<=mon[m]; i++) {
if(i==3 && mon[m]==19) {
i += 11;
mon[m] += 11;
}
if(i > 9)
*s = i/10+'0';
s++;
*s++ = i%10+'0';
s++;
if(++d == 7) {
d = 0;
s = p+w;
p = s;
}
}
}
/* return day of the week of jan 1 of given year */
static int jan1(int yr)
{
int d;
/* normal gregorian calendar one extra day per four years */
d = 4+yr+(yr+3)/4;
/* julian calendar regular gregorian less three days per 400 */
if(yr > 1800) {
d -= (yr-1701)/100;
d += (yr-1601)/400;
}
/* great calendar changeover instant */
if(yr > 1752) {
d += 3;
}
return(d%7);
}
[-- Attachment #4: Type: text/plain, Size: 218 bytes --]
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
2009-12-02 1:34 ` odd segfault with my c program using cygwin 1.7 jeffunit
@ 2009-12-02 6:35 ` Andy Koppe
2009-12-02 7:22 ` Dave Korn
2009-12-02 12:03 ` Eliot Moss
0 siblings, 2 replies; 10+ messages in thread
From: Andy Koppe @ 2009-12-02 6:35 UTC (permalink / raw)
To: cygwin
2009/12/2 jeffunit:
> My program ran fine under cygwin 1.5 as well as many versions of linux
> including
> mandriva 2009, mandriva 2009.1 and mandriva 2010.0
>
> When compiled with
> gcc cal.c -o cal
> and run with
> cal 2009
> I get a segmentation fault.
> When I uncomment line 62, the program runs successfully.
It's the line after that that has the bug: it's writing to index 432
of a 432-element array.
> I have had other problems with recent versions of cygwin 1.7 which makes me
> suspect some kind of error outside my programs.
The First Rule of Programming: It's Always Your Fault
http://www.codinghorror.com/blog/archives/001079.html
;) Andy
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
2009-12-02 6:35 ` Andy Koppe
@ 2009-12-02 7:22 ` Dave Korn
2009-12-02 7:46 ` Andy Koppe
2009-12-02 12:03 ` Eliot Moss
1 sibling, 1 reply; 10+ messages in thread
From: Dave Korn @ 2009-12-02 7:22 UTC (permalink / raw)
To: cygwin
Andy Koppe wrote:
> 2009/12/2 jeffunit:
>> My program ran fine under cygwin 1.5 as well as many versions of linux
>> including
>> mandriva 2009, mandriva 2009.1 and mandriva 2010.0
>>
>> When compiled with
>> gcc cal.c -o cal
>> and run with
>> cal 2009
>> I get a segmentation fault.
>> When I uncomment line 62, the program runs successfully.
>
> It's the line after that that has the bug: it's writing to index 432
> of a 432-element array.
Doesn't look like it does to me:
> for(j=0; j<6*72; j++) {
> //printf("joe %d\n", j);
> string[j] = '\0';
> }
That's less than 432, not less than or equal.
It ran to completion on my machine without a problem. I tried it without
any -O option, and at -O{0,2,3} without any problem. I ran it under gdb and
set a watchpoint on string[432] and it ran without tripping. So I don't know
what's going wrong for OP.
cheers,
DaveK
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
2009-12-02 7:22 ` Dave Korn
@ 2009-12-02 7:46 ` Andy Koppe
2009-12-02 9:08 ` Dave Korn
0 siblings, 1 reply; 10+ messages in thread
From: Andy Koppe @ 2009-12-02 7:46 UTC (permalink / raw)
To: cygwin
2009/12/2 Dave Korn:
> Andy Koppe wrote:
>> 2009/12/2 jeffunit:
>>> My program ran fine under cygwin 1.5 as well as many versions of linux
>>> including
>>> mandriva 2009, mandriva 2009.1 and mandriva 2010.0
>>>
>>> When compiled with
>>> gcc cal.c -o cal
>>> and run with
>>> cal 2009
>>> I get a segmentation fault.
>>> When I uncomment line 62, the program runs successfully.
>>
>> It's the line after that that has the bug: it's writing to index 432
>> of a 432-element array.
>
> Doesn't look like it does to me:
>
>> for(j=0; j<6*72; j++) {
>> //printf("joe %d\n", j);
>> string[j] = '\0';
>> }
>
> That's less than 432, not less than or equal.
You're right, somehow I'd completely misread that, thinking that the
string[j]='\0' is outside the loop.
Sorry,
Andy
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
2009-12-02 7:46 ` Andy Koppe
@ 2009-12-02 9:08 ` Dave Korn
0 siblings, 0 replies; 10+ messages in thread
From: Dave Korn @ 2009-12-02 9:08 UTC (permalink / raw)
To: cygwin
Andy Koppe wrote:
> 2009/12/2 Dave Korn:
>> Andy Koppe wrote:
>>> 2009/12/2 jeffunit:
>>>> My program ran fine under cygwin 1.5 as well as many versions of
>>>> linux including mandriva 2009, mandriva 2009.1 and mandriva 2010.0
>>>>
>>>> When compiled with
>>>> gcc cal.c -o cal
>>>> and run with
>>>> cal 2009
>>>> I get a segmentation fault.
>>>> When I uncomment line 62, the program runs successfully.
>>> It's the line after that that has the bug: it's writing to index 432
>>> of a 432-element array.
>> Doesn't look like it does to me:
>>
>>> for(j=0; j<6*72; j++) {
>>> //printf("joe %d\n", j);
>>> string[j] = '\0';
>>> }
>> That's less than 432, not less than or equal.
>
> You're right, somehow I'd completely misread that, thinking that the
> string[j]='\0' is outside the loop.
Still, it could be some other overflow somewhere else; as I'd guess you were
reasoning, that's the commonest reason for this sort of bug that crops up on
some platforms with some stack and memory layouts and not others.
Jeff, recompile your code, adding the "-g" flag, then run it under gdb, and
when the segfault happens, use the "bt" command to get a backtrace and see
where you are.
cheers,
DaveK
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
2009-12-02 6:35 ` Andy Koppe
2009-12-02 7:22 ` Dave Korn
@ 2009-12-02 12:03 ` Eliot Moss
2009-12-02 12:16 ` mike marchywka
1 sibling, 1 reply; 10+ messages in thread
From: Eliot Moss @ 2009-12-02 12:03 UTC (permalink / raw)
To: cygwin
Andy Koppe wrote:
> 2009/12/2 jeffunit:
>>
>> When compiled with
>> gcc cal.c -o cal
>> and run with
>> cal 2009
>> I get a segmentation fault.
>> When I uncomment line 62, the program runs successfully.
>
> It's the line after that that has the bug: it's writing to index 432
> of a 432-element array.
I disagree -- I uncommented the line to verify, but it's clear
that j<6*72 keeps j within the array. The program compiles and
runs fine in my up-to-date cygwin 1.7 setup under Windows 7.
There must be something else going on for the OP.
Best wishes -- Eliot Mos
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
2009-12-02 12:03 ` Eliot Moss
@ 2009-12-02 12:16 ` mike marchywka
0 siblings, 0 replies; 10+ messages in thread
From: mike marchywka @ 2009-12-02 12:16 UTC (permalink / raw)
To: cygwin
On 12/2/09, Eliot Moss <moss@cs.umass.edu> wrote:
> Andy Koppe wrote:
>> 2009/12/2 jeffunit:
>>>
>>> When compiled with
>>> gcc cal.c -o cal
>>> and run with
>>> cal 2009
>>> I get a segmentation fault.
>>> When I uncomment line 62, the program runs successfully.
>>
>> It's the line after that that has the bug: it's writing to index 432
>> of a 432-element array.
>
> I disagree -- I uncommented the line to verify, but it's clear
> that j<6*72 keeps j within the array. The program compiles and
> runs fine in my up-to-date cygwin 1.7 setup under Windows 7.
> There must be something else going on for the OP.
>
Does OP get a consistent failure mode with different compiler options?
> Best wishes -- Eliot Mos
>
> --
> 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
>
>
--
marchywka@gmail.com
Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
415-264-8477 (w)<- use this
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: hotmail is censoring incoming mail using random criteria beyond
my control and often hangs my browser
but all my subscriptions are here..., try also marchywka@yahoo.com
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
2009-12-02 13:23 jeffunit
@ 2009-12-02 13:37 ` mike marchywka
0 siblings, 0 replies; 10+ messages in thread
From: mike marchywka @ 2009-12-02 13:37 UTC (permalink / raw)
To: cygwin
On 12/2/09, jeffunit <jeff@jeffunit.com> wrote:
>
> Still, it could be some other overflow somewhere else; as I'd guess you
> were
> reasoning, that's the commonest reason for this sort of bug that crops up on
> some platforms with some stack and memory layouts and not others.
>
> Jeff, recompile your code, adding the "-g" flag, then run it under gdb,
> and
> when the segfault happens, use the "bt" command to get a backtrace and see
> where you are.
>
> cheers,
> DaveK
>
> It runs correctly under the debugger, without core dump.
> I am 99.9% sure the bug is outside my program. As I said,
> I have run it successfully with cygwin 1.5, and linux.
>
> I cannot imagine commenting/uncommenting the print statement
> changing the program execution. I suspect a library resource
> issue causing the segfault.
>
Memory corruption is tricky, right up there with threading problems.
This loop seems pretty self contained, what else are you doing prior
to that? An investigation along these lines doesn't rule out a library
problem but does help find more possibilities. Somtimes linking
with bad libs can cause odd behaviours- have you tried to catch
the fault? I found a build problem by an inability to catch "anything."
> As others have pointed out, I am pretty sure it is not going
> out of bounds on the array.
>
> thanks,
> jeff
>
>
>
>
>
>
>
> --
> 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
>
>
--
marchywka@gmail.com
Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
415-264-8477 (w)<- use this
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: hotmail is censoring incoming mail using random criteria beyond
my control and often hangs my browser
but all my subscriptions are here..., try also marchywka@yahoo.com
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: odd segfault with my c program using cygwin 1.7
@ 2009-12-02 13:23 jeffunit
2009-12-02 13:37 ` mike marchywka
0 siblings, 1 reply; 10+ messages in thread
From: jeffunit @ 2009-12-02 13:23 UTC (permalink / raw)
To: cygwin
Still, it could be some other overflow somewhere else; as I'd guess you were
reasoning, that's the commonest reason for this sort of bug that crops up on
some platforms with some stack and memory layouts and not others.
Jeff, recompile your code, adding the "-g" flag, then run it under gdb, and
when the segfault happens, use the "bt" command to get a backtrace and see
where you are.
cheers,
DaveK
It runs correctly under the debugger, without core dump.
I am 99.9% sure the bug is outside my program. As I said,
I have run it successfully with cygwin 1.5, and linux.
I cannot imagine commenting/uncommenting the print statement
changing the program execution. I suspect a library resource
issue causing the segfault.
As others have pointed out, I am pretty sure it is not going
out of bounds on the array.
thanks,
jeff
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-12-02 13:37 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-02 16:30 weird samba problems, latest cygwin, samba 3.0.25b-4.2 jeff
[not found] ` <20071202162155.XNVY20104.mta10.adelphia.net@dual-xeon.weas el.com>
2009-12-02 1:34 ` odd segfault with my c program using cygwin 1.7 jeffunit
2009-12-02 6:35 ` Andy Koppe
2009-12-02 7:22 ` Dave Korn
2009-12-02 7:46 ` Andy Koppe
2009-12-02 9:08 ` Dave Korn
2009-12-02 12:03 ` Eliot Moss
2009-12-02 12:16 ` mike marchywka
2009-12-02 13:23 jeffunit
2009-12-02 13:37 ` mike marchywka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).