[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#216849: [sparc] Re: Bug#216849: relocation overflow error



severity 216849 normal
thanks

critical is defined as:
    makes unrelated software on the system (or the whole system)
    break, or causes serious data loss, or introduces a security hole on
    systems where you install the package.

Ben Collins writes:
> This is a bug in the code. Too much allocation on the stack:
> 
> int read_infos (int socket_data, char **infos) {
>     int  nb;
>     char datas[SSIZE_MAX];
> 
>     /* SSIZE_MAX = 2147483647 */
> 
> That's 2 gigs of stack allocation...not likely to happen :) It produces
> this overflow of stack in assembly:
> 
> read_infos:
> .LLFB46:
> 	.loc 1 197 0
> 	!#PROLOGUE# 0
> 	save    %sp, --2147483544, %sp
> 
> Notice the double negative, produces by overflowing the stack pointer,
> which only uses, internally, a signed int. That is plenty enough to hold
> a normal, legal stack, but not really enough for your needs.
> 
> If you need that much (I can't see that you would), then malloc it.
> 
> -- 
> Debian     - http://www.debian.org/
> Linux 1394 - http://www.linux1394.org/
> Subversion - http://subversion.tigris.org/
> WatchGuard - http://www.watchguard.com/
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: