From owner-freebsd-questions Fri May 19 16:47:26 2000 Delivered-To: freebsd-questions@freebsd.org Received: from lince.tdnet.com.br (lince.tdnet.com.br [200.236.148.6]) by hub.freebsd.org (Postfix) with ESMTP id 61A9137B50B for ; Fri, 19 May 2000 16:47:19 -0700 (PDT) (envelope-from kernel@tdnet.com.br) Received: from tdnet.com.br [200.236.148.114] by lince.tdnet.com.br with ESMTP (SMTPD32-5.00) id A46D935D014C; Fri, 19 May 2000 19:47:09 -0300 Message-ID: <3925D2E4.F2B9D6C5@tdnet.com.br> Date: Fri, 19 May 2000 20:48:52 -0300 From: Gustavo Vieira Goncalves Coelho Rios X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 4.0-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: questions@freebsd.org Subject: stack trace: what's the problem? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am debugging a program. Here is a cut-paste from my gdb session: (gdb) n 70 strncat(path, dir, 3); (gdb) bt #0 create (dir=0x804d035 "/00") at getdir.c:70 #1 0x80489c0 in getdir () at getdir.c:25 #2 0x8048825 in add_user (name=0xbfbff8d9 "aro", domain=0xbfbff8dd "rios.org", dir=0x0) at add.c:26 #3 0x8048792 in main (argc=3, argv=0xbfbff7d8) at stub_add.c:12 #4 0x80486ed in _start () (gdb) n 71 st = mkdir(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); (gdb) bt #0 create (dir=0x804d035 "/00") at getdir.c:71 #1 0x80489c0 in getdir () at getdir.c:25 #2 0x105e100 in ?? () #3 0x8048550 in printf () Error accessing memory address 0x42: Bad address. As you can see, at a given point everything is ok, but justa after the execution of the command at line #71, my stack get corrupted. What am i doing wrong? I really thank you for your time and cooperation. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message