This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
core dump in getenv()
- To: <gcc-bugs at gcc dot gnu dot org>
- Subject: core dump in getenv()
- From: "Tom McHugh" <tom at landel dot com>
- Date: Fri, 5 Jan 2001 15:46:55 -0800
- Reply-To: <tom at landel dot com>
Hello. I've been having a problem porting my C code to gcc version
egcs-2.91.66. It was developed on gcc version 2.7.2.3 but when I run it on
egcs-2.91.66, I get segmentation faults in getenv(). Does anyone know what
could cause this? Here is a trace dump:
Thanks for any help you can provide.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `lspd/6008: tombob@pop.mailbug.c'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
#0 getenv (name=0x4010163e "CALDOMAIN") at ../sysdeps/generic/getenv.c:88
88 ../sysdeps/generic/getenv.c: No such file or directory.
(gdb) where
#0 getenv (name=0x4010163e "CALDOMAIN") at ../sysdeps/generic/getenv.c:88
#1 0x400391d3 in __secure_getenv (name=0x4010163c "LOCALDOMAIN")
at secure-getenv.c:29
#2 0x400d9293 in res_init () at res_init.c:220
#3 0x400dca43 in gethostbyname (name=0x806dc40 "pop.mailbug.com")
at ../nss/getXXbyYY.c:104
#4 0x8053c89 in atoaddr (address=0x806dc40 "pop.mailbug.com") at
socket.c:116
#5 0x8053a93 in open_tcp (netaddress=0x806dc40 "pop.mailbug.com", port=110,
timeout=10) at socket.c:41
#6 0x804eff4 in authenticate (username=0x806dcc0 "tombob",
passwd=0x806dd40 "bob1tom", host=0x806dc40 "pop.mailbug.com", proto=0)
at inetmail.c:494
#7 0x804a39c in lsp_session () at session.c:195
#8 0x8049dcf in main (argc=3, argv=0xbffffcf4) at main.c:55
---------------------------------------
Tom McHugh
Sr. Software Engineer
Landel Telecom
(408)360-0496