[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #1726: chicken.base#implicit-exit-handler reporting segmentation vio
From: |
Chicken Trac |
Subject: |
Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size |
Date: |
Sun, 17 Jan 2021 18:43:00 -0000 |
#1726: chicken.base#implicit-exit-handler reporting segmentation violation with
non-default heap size
---------------------------------------+--------------------
Reporter: vjorlikowski | Owner: (none)
Type: defect | Status: new
Priority: minor | Milestone: 5.3
Component: core libraries | Version: 5.1.0
Resolution: | Keywords:
Estimated difficulty: |
---------------------------------------+--------------------
Comment (by sjamaan):
It looks like when `C_set_or_change_heap_size` is invoked with `reinit=1`,
it only recreates the symbol table, but the termination continuation is
still allocated on the old heap which is now in freed memory. This was
allocated by `CHICKEN_initialize`.
I tried to copy that bit into the `if(reintern) ...` block of
`C_set_or_change_heap_size` so that the termination continuation is
pointing into the correct heap, but that didn't seem to fix the situation.
I also tried resetting the temporary stack before doing this, but that
didn't help either. I guess by the time the toplevel is called, the
continuation pointer that's passed to it is still pointing into the old
heap.
I think we need to longjump back and re-invoke the toplevel. But then it
needs to know that it shouldn't try to resize the heap *again*. Or somehow
we must do something with the termination continuation. Maybe not allocate
it on the heap?
Possibly instead treat the heap reallocation as a reallocating GC?
--
Ticket URL: <https://bugs.call-cc.org/ticket/1726#comment:6>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size, Chicken Trac, 2021/01/14
- Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size, Chicken Trac, 2021/01/14
- Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size, Chicken Trac, 2021/01/15
- Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size, Chicken Trac, 2021/01/15
- Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size, Chicken Trac, 2021/01/15
- Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size, Chicken Trac, 2021/01/15
- Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size, Chicken Trac, 2021/01/16
- Re: #1726: chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size,
Chicken Trac <=