Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2003 17:10:10 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Ferruccio Vitale <ferruccio.vitale@tin.it>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: variable size too large?
Message-ID:  <20030314151010.GB452@straylight.oblivion.bg>
In-Reply-To: <20030314153729.3825d4fe.ferruccio.vitale@tin.it>
References:  <20030314153729.3825d4fe.ferruccio.vitale@tin.it>

next in thread | previous in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030314151010.GB452>