[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pvm_execute_or_initialize SEGV with reproducer
From: |
David Faust |
Subject: |
Re: pvm_execute_or_initialize SEGV with reproducer |
Date: |
Thu, 22 Apr 2021 13:53:45 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 4/22/21 1:30 PM, Jose E. Marchesi wrote:
>
>> Hi David.
>>
>> Thanks for reporting.
>>
>>> The same also occurs with none of the --disables, they serve to simplify
>>> the backtrace.
>>>
>>> (poke) .file ~/playpen/btf/poke-fault/poke-fault.o
>>> (poke) load elf
>>> (poke) load "btf-dump.pk" # note, this also loads btf.pk
>>> (poke) var elf = Elf64_File @ 0#B
>>> (poke) var shdr = elf.get_sections_by_name (".BTF") [0]
>>> (poke) var btf = BTF_Section @ shdr.sh_offset
>>
>> I took a quick look, and it seems that the exceptions stack is being
>> overflown. This is probably a code generator bug: somehow we are not
>> executing enough `pope' instructions for all the `pushe'.
>>
>> As far as I can see, we are starting to "leak" elements in the
>> exceptions stack in:
>>
>> (poke) var btf = BTF_Section @ shdr.sh_offset
>>
>> As soon as I have a little time I will look at all the places where the
>> compiler is generating pushe/pope pairs and see what is going on..
>> unless someone beats me to it :)
>
>
> Ok this is now fixed by the commit below, which I have pushed to both
> master and maint/poke-1.
>
> It should fix your issue with btf-dump.
Yep, looks like this fixes the issue (and wow, that was quick!)
Thanks!
>
>
> pkl-gen: avoid leaking slots in the exceptions stack
>
> 2021-04-22 Jose E. Marchesi <jemarch@gnu.org>
>
> * libpoke/pkl-gen.pks (struct_mapper): Avoid "leaking" slots in
> the exceptions stack.
> (struct_field_mapper): Likewise.
>