Re: lang/sbcl consumes all available memory and dies

From: Anonymous <swell.k_at_gmail.com>
Date: Tue, 17 Mar 2009 05:03:53 +0300
(oops, vague wording)

Anonymous <swell.k_at_gmail.com> writes:
> Kostik Belousov <kostikbel_at_gmail.com> writes:
>> Please, try this patch.
>>
>> diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
>> index f2bdcf5..5604ea5 100644
>> --- a/sys/kern/imgact_elf.c
>> +++ b/sys/kern/imgact_elf.c
>> _at__at_ -1330,14 +1330,14 _at__at_ __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote,
>>      int32_t *osrel)
>>  {
>>  	const Elf_Note *note, *note_end;
>> -	const Elf32_Phdr *phdr, *pnote;
>> -	const Elf32_Ehdr *hdr;
>> +	const Elf_Phdr *phdr, *pnote;
>> +	const Elf_Ehdr *hdr;
>>  	const char *note_name;
>>  	int i;
>>  
>>  	pnote = NULL;
>> -	hdr = (const Elf32_Ehdr *)imgp->image_header;
>> -	phdr = (const Elf32_Phdr *)(imgp->image_header + hdr->e_phoff);
>> +	hdr = (const Elf_Ehdr *)imgp->image_header;
>> +	phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff);
>>  
>>  	for (i = 0; i < hdr->e_phnum; i++) {
>>  		if (phdr[i].p_type == PT_NOTE) {
>
> Double-checked on more recent revision (r189900) under qemu-amd64
> with/without the patch. The problem disappears.
                                             ^^^^^^^
It disappears only *after* applying your patch.

>
> Don't know about i386, though.

Just tested under qemu-i386. Looks like it's not affected.
Anyway, *with* the patch sbcl works, too.
Received on Tue Mar 17 2009 - 01:03:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:44 UTC