Re: Segfault in memcpy() .. help... :)

From: MEZICK, ANGUS (AMEZICK@corporate.pria.com)
Date: 04/11/96


try compiling with the -g option

 ----------
From: owner-circle
To: Michael J. Cunningham
Cc: CircleMUD Mailing List
Subject: Re: Segfault in memcpy() .. help... :)
Date: Thursday, April 11, 1996 1:28PM

On Wed, 10 Apr 1996, Michael J. Cunningham wrote:

> On Thu, 11 Apr 1996, Rasmus Rxnlev wrote:
>=20
> > (gdb) back       This is the same output as with the where cmd.
> > #0  0xdf66231c in _memcpy ()
> > #1  0xdf69e6a8 in _doprnt ()
> > #2  0xdf6ab16c in sprintf ()
> > #3  0xa9244 in write_aliases (ch=3D0x8f69c8) at alias.c:35
>=20
> Without being able to determine the exact line in your program that
> it died..you didnt list it, I would say that you are trying to=20
> sprintf a null pointer into a buffer. This is proably the cause of
> the _memcpy problem. Put a check in before the sprintf to make sure
> that the variable is not null before trying to copy it to the buffer.

Well... How di I do that ?
I am using GDB on the CORE file, if there is a way to make gdb show at=20
what line in the CircleMUD code it crashed.. uhm.. Please enlighten me :)

Allso.. if anyone has an idea if there is some mini-hacker help/doc file=20
on GDB somewhere I'd be gratefull... the gdb help pages just spam me=20
without really helping me a lot.. *sulk*

Regards,
Con

d.
 --
***************************************************************************
*                            *    Visit my homepage:                      *
*   Rasmus R=F8nlev DOEK'94    *    http://www.econ.cbs.dk/people/raro94ab =
 *
*   Student instructor       *    Visit my Multi User Dungeon (MUD):      *
*                            *    ns3.ptd.net 5000 or 198.80.46.3 5000    *=
  =20
***************************************************************************
*                                                                         *
*      Student, B.Sc in Computer Science and Business Administration      *
*                                                                         *
***************************************************************************



This archive was generated by hypermail 2b30 : 12/18/00 PST