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>

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

[-- Attachment #1 --]
On Fri, Mar 14, 2003 at 03:37:29PM +0100, Ferruccio Vitale wrote:
> Hi all,
> 
> I'm writing a little multithread program: in my thread function, I allocated a char variable of IP_MAXPACKET size; when I try to compile it, everything goes well, but when I run it, it dies, making a core file. 
> 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 normally
> 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
> 
> 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

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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+cfDS7Ri2jRYZRVMRAtS2AJ9qUHFiRNkByuYZSYsOYpDr8Jdc5QCffqQk
ixx6bIQjLcHM6e46yFMN/fY=
=+Jlq
-----END PGP SIGNATURE-----
help

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