Alex Shinn | 6 Oct 16:12 2011
Picon

Re: "Segmentation fault" from "struct addrinfo" finalizer

On Thu, Oct 6, 2011 at 10:32 PM, Lorenzo Campedelli
<lorenzo.campedelli@...> wrote:
> I got this trying to play with the chibi.net module:
>
> chibi-scheme -mchibi.net -e '(get-address-info "127.0.0.1" "8082")'
> Segmentation fault
>
> I tried to debug it a bit and it appears the problem is caused by calling
> the finalizer for the dynamic library first (sexp_finalize_dl) and the
> finalizer for the structure later (sexp_freeaddrinfo_stub).
> When the latter is called, the dynamic library net.so has already been
> unloaded thus the exception.

Good catch - the library won't be unloaded so long
as any references to opcodes in it exist, but the
finalizer references are implicit.

I'll fix this over the weekend, either by making the
types themselves refer to the library, or just reverting
the patch.

> P.S.: Alex, would you prefer me to open an issue for this kind of things?

Whichever you prefer.

-- 
Alex

--

-- 
You received this message because you are subscribed to the Google Groups "chibi-scheme" group.
(Continue reading)

Alex Shinn | 6 Oct 16:54 2011
Picon

Re: "Segmentation fault" from "struct addrinfo" finalizer

On Thu, Oct 6, 2011 at 11:12 PM, Alex Shinn <alexshinn@...> wrote:
> On Thu, Oct 6, 2011 at 10:32 PM, Lorenzo Campedelli
> <lorenzo.campedelli@...> wrote:
>> I got this trying to play with the chibi.net module:
>>
>> chibi-scheme -mchibi.net -e '(get-address-info "127.0.0.1" "8082")'
>> Segmentation fault
>>
>> I tried to debug it a bit and it appears the problem is caused by calling
>> the finalizer for the dynamic library first (sexp_finalize_dl) and the
>> finalizer for the structure later (sexp_freeaddrinfo_stub).
>> When the latter is called, the dynamic library net.so has already been
>> unloaded thus the exception.

OK, fix pushed.  Reclaiming unused types is a lower
priority todo that probably won't make it in 0.5.

-- 
Alex

--

-- 
You received this message because you are subscribed to the Google Groups "chibi-scheme" group.
To post to this group, send email to chibi-scheme@...
To unsubscribe from this group, send email to chibi-scheme+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/chibi-scheme?hl=en.


Gmane