In article < >
Martin <> wrote:
>My program cored and the following is the call stack in dbx. I would
>like to know what are the possibilities that when perror is being
>called, it will core?
Calling perror() with an invalid argument could do that. What I
do not understand is why you are asking about perror() when the
text below suggests the code is calling ferror():
>terminated by signal SEGV (no mapping at the fault address)
>0xff111278: ferror+0x0028: ldub [%i0 + 0xe], %o0
>(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
>=>[1] ferror(0x0, 0x53683c, 0x53683c, 0xff13fdc8, 0xff1ea08c, 0x39),
>at 0xff111278
> [2] GL_MsgLogger::record(0xfbca30, 0x0, 0xfc8f1f98, 0x312, 0x1,
>0xfc8f175d), at 0x380198
> [3] GL_V5Session::Send(0xfc3a30, 0xfc8f85a0, 0x531628, 0xfbca30,
>0xfc8f6008, 0xfc8f6010), at 0x34b0dc
It is hard to be sure (because "optimization" can change things), but
given what I know about the specific machine, and this output from
the debugger, it looks like someone did:
ferror(fp)
where fp == NULL.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it
http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.