Cygwin seg faults using dyn. memory
Ethan Mallove
emallove@yahoo.com
Thu Feb 21 21:45:00 GMT 2002
cygwin seg faults when i attempt to assign values to
allocated dynamic memory. The same code isn't
seg-faulting on a Compaq Tru64 UNIX V5.1A machine.
is there a setting where the heap needs to be
adjusted? are there libraries i need to include that
i haven't?
here's the embarassingly simple problematic code:
#include "Name.h"
#include "readItem.h"
#include <iostream.h>
#include <string.h>
using namespace std;
int main() {
Name * dummy2;
dummy2 = new Name;
cin >> dummy2;
cin >> *dummy2;
cout << *dummy2;
return 0;
}
---------------------------------------------------
here's my cygcheck:
Cygwin Win95/NT Configuration Diagnostics
Current System Time: Wed Feb 20 16:11:16 2002
Windows 98 SE Ver 4.10 Build 2222
Path: C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
c:\TEXMF\MIKTEX\BIN
c:\WINDOWS
c:\WINDOWS
c:\WINDOWS\COMMAND
c:\PROGRA~1\BORLAND\CBUILD~1\BIN
c:\PROGRA~1\BORLAND\CBUILD~1\PROJECTS\BPL
SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS
HOME = `C:\cygwin\usr\416\4g\Ethan'
MAKE_MODE = `unix'
PWD = `/usr/416/4g'
USER = `Ethan'
BLASTER = `A220 I9 D1 T4'
CLASSPATH = `C:\PROGRA~1\CANONC~1\PDELUXE\ADOBEC~1'
CMDLINE = `bash --login -i'
COMSPEC = `C:\COMMAND.COM'
OLDPWD = `/'
PROMPT = `$p$g'
PS1 = `\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
SHLVL = `1'
TEMP = `c:\windows\TEMP'
TERM = `cygwin'
TMP = `c:\windows\TEMP'
WINBOOTDIR = `C:\WINDOWS'
WINDIR = `C:\WINDOWS'
_ = `/usr/bin/cygcheck'
HKEY_CURRENT_USER\Software\Cygnus Solutions
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_LOCAL_MACHINE\Software\Cygnus Solutions
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\Software\Cygnus
Solutions\Cygwin\mounts v2
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
a: fd N/A N/A
c: hd FAT32 3796Mb 82% CP UN
d: cd CDFS 640Mb 100%
020219_0314
C:/cygwin / system binmode
C:/cygwin/bin /usr/bin system binmode
C:/cygwin/lib /usr/lib system binmode
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: c:\WINDOWS\COMMAND\find.exe
Warning: C:\cygwin\bin\find.exe hides
c:\WINDOWS\COMMAND\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: c:\PROGRA~1\BORLAND\CBUILD~1\BIN\make.exe
Found: C:\cygwin\bin\sh.exe
81k 2001/10/20 C:\cygwin\bin\cygitcl30.dll - os=4.0
img=1.0 sys=4.0
"cygitcl30.dll" v0.0 ts=2001/10/19
17:25
35k 2001/10/20 C:\cygwin\bin\cygitk30.dll - os=4.0
img=1.0 sys=4.0
"cygitk30.dll" v0.0 ts=2001/10/19
17:25
390k 2001/10/20 C:\cygwin\bin\cygtcl80.dll - os=4.0
img=1.0 sys=4.0
"cygtcl80.dll" v0.0 ts=2001/10/19
17:24
5k 2001/10/20 C:\cygwin\bin\cygtclpip80.dll -
os=4.0 img=1.0 sys=4.0
10k 2001/10/20 C:\cygwin\bin\cygtclreg80.dll -
os=4.0 img=1.0 sys=4.0
"cygtclreg80.dll" v0.0 ts=2001/10/19
17:24
623k 2001/10/20 C:\cygwin\bin\cygtk80.dll - os=4.0
img=1.0 sys=4.0
"cygtk80.dll" v0.0 ts=2001/10/19
17:25
18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0
img=1.0 sys=4.0
"cyggdbm.dll" v0.0 ts=2000/10/22
19:26
21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0
img=1.0 sys=4.0
"cygintl.dll" v0.0 ts=2001/6/20
10:09
22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll - os=4.0
img=1.0 sys=4.0
"cygintl-1.dll" v0.0 ts=2001/12/13
1:28
45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=4.0
img=1.0 sys=4.0
"cygform5.dll" v0.0 ts=2001/4/24
22:28
26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=4.0
img=1.0 sys=4.0
"cygmenu5.dll" v0.0 ts=2001/4/24
22:27
156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll -
os=4.0 img=1.0 sys=4.0
"cygncurses++5.dll" v0.0
ts=2001/4/24 22:29
226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll -
os=4.0 img=1.0 sys=4.0
"cygncurses5.dll" v0.0 ts=2001/4/24
22:17
15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=4.0
img=1.0 sys=4.0
"cygpanel5.dll" v0.0 ts=2001/4/24
22:27
35k 2002/01/09 C:\cygwin\bin\cygform6.dll - os=4.0
img=1.0 sys=4.0
"cygform6.dll" v0.0 ts=2002/1/8
22:03
20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll - os=4.0
img=1.0 sys=4.0
"cygmenu6.dll" v0.0 ts=2002/1/8
22:03
175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll -
os=4.0 img=1.0 sys=4.0
"cygncurses++6.dll" v0.0 ts=2002/1/8
22:03
202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll -
os=4.0 img=1.0 sys=4.0
"cygncurses6.dll" v0.0 ts=2002/1/8
22:03
12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll - os=4.0
img=1.0 sys=4.0
"cygpanel6.dll" v0.0 ts=2002/1/8
22:03
17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll -
os=4.0 img=1.0 sys=4.0
"cyghistory4.dll" v0.0 ts=2001/1/6
20:34
108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll -
os=4.0 img=1.0 sys=4.0
"cygreadline4.dll" v0.0 ts=2001/1/6
20:34
20k 2002/01/13 C:\cygwin\bin\cyghistory5.dll -
os=4.0 img=1.0 sys=4.0
"cyghistory5.dll" v0.0 ts=2002/1/12
17:27
121k 2002/01/13 C:\cygwin\bin\cygreadline5.dll -
os=4.0 img=1.0 sys=4.0
"cygreadline5.dll" v0.0 ts=2002/1/12
17:27
50k 2002/01/20 C:\cygwin\bin\cygz.dll - os=4.0
img=1.0 sys=4.0
"cygz.dll" v0.0 ts=2002/1/20 11:41
751k 2002/01/21 C:\cygwin\bin\cygwin1.dll - os=4.0
img=1.0 sys=4.0
"cygwin1.dll" v0.0 ts=2002/1/21 9:48
Cygwin DLL version info:
DLL version: 1.3.9
DLL epoch: 19
DLL bad signal mask: 19005
DLL old termios: 5
DLL malloc env: 28
API major: 0
API minor: 51
Shared data: 3
DLL identifier: cygwin1
Mount registry: 2
Cygnus registry name: Cygnus Solutions
Cygwin registry name: Cygwin
Program options name: Program Options
Cygwin mount registry name: mounts v2
Cygdrive flags: cygdrive flags
Cygdrive prefix: cygdrive prefix
Cygdrive default prefix:
Build date: Mon Jan 21 12:48:41 EST 2002
Shared id: cygwin1S3
Cygwin Package Information
Last downloaded files to: pÃs
Last downloaded files from: ÃÂ
Package Version
ash 20020131-1
bash 2.05a-2
binutils 20011002-1
cygwin 1.3.9-1
diff 0.0
ed 0.2-1
fileutils 4.1-1
findutils 4.1
gawk 3.0.4-1
gcc 2.95.3-5
gdb 20010428-3
gdbm 1.8.0-3
grep 2.4.2-1
groff 1.17.2-1
gzip 1.3.2-1
less 358-3
libintl 0.10.38-3
libintl1 0.10.40-1
libncurses5 5.2-1
libncurses6 5.2-8
libreadline4 4.1-2
libreadline5 4.2a-1
login 1.4-3
man 1.5g-2
nano 1.0.6-1
ncftp 3.0.2-2
ncurses 5.2-8
newlib-man 20001118-1
readline 4.2a-1
sed 3.02-1
sh-utils 2.0-2
tar 1.13.19-1
termcap 20010825-1
terminfo 5.2-1
textutils 2.0.16-1
vim 6.0.93-1
w32api 1.1-1
which 1.5-1
zlib 1.1.3-7
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list