From owner-freebsd-hackers Fri Mar 14 7:11:53 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B184A37B401 for ; Fri, 14 Mar 2003 07:11:51 -0800 (PST) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 1495343FAF for ; Fri, 14 Mar 2003 07:11:50 -0800 (PST) (envelope-from roam@ringlet.net) Received: (qmail 1970 invoked from network); 14 Mar 2003 15:07:20 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 14 Mar 2003 15:07:19 -0000 Received: (qmail 9541 invoked by uid 1000); 14 Mar 2003 15:10:10 -0000 Date: Fri, 14 Mar 2003 17:10:10 +0200 From: Peter Pentchev To: Ferruccio Vitale Cc: freebsd-hackers@freebsd.org Subject: Re: variable size too large? Message-ID: <20030314151010.GB452@straylight.oblivion.bg> Mail-Followup-To: Ferruccio Vitale , freebsd-hackers@freebsd.org References: <20030314153729.3825d4fe.ferruccio.vitale@tin.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z4IKABJTiQIqPwmW" Content-Disposition: inline In-Reply-To: <20030314153729.3825d4fe.ferruccio.vitale@tin.it> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --z4IKABJTiQIqPwmW Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 14, 2003 at 03:37:29PM +0100, Ferruccio Vitale wrote: > Hi all, >=20 > I'm writing a little multithread program: in my thread function, I alloca= ted a char variable of IP_MAXPACKET size; when I try to compile it, everyth= ing goes well, but when I run it, it dies, making a core file.=20 > Assume that: > 1) the same code, with only one thread, linked to libc, runs normally > 2) the same code, with a smaller variable size, linked to libc_r, runs no= rmally > 3) I tried to allocate two variables of 64000 bytes in this function (IP_= MAXPACKET is equal to 65535), linked to libc_r and runs normally >=20 > Where am I wrong? :)) It would be very hard to say, without seeing your program and, if possible, the output of a gdb session which shows where exactly the program dies. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If you think this sentence is confusing, then change one pig. --z4IKABJTiQIqPwmW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+cfDS7Ri2jRYZRVMRAtS2AJ9qUHFiRNkByuYZSYsOYpDr8Jdc5QCffqQk ixx6bIQjLcHM6e46yFMN/fY= =+Jlq -----END PGP SIGNATURE----- --z4IKABJTiQIqPwmW-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message