Re: crashing socket tests

Vladimir Tzankov <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAHWYE6LT=v5nziZE8bi0LToL4CrGuOfbuP9_0he5nLoZBpgeRw@mail.gmail.com>
Hi Bruno,

On Sun, May 28, 2017 at 5:20 PM, Vladimir Tzankov <[email protected]>
wrote:

> > The stream object has been moved due to compaction but strm_encoding has
>> > either not moved (unlikely - its heap has shrunk) or has not been
>> updated.
>>
>> I'd also guess that it has not been updated. Is the reclength of the
>> stream appropriate? Has the reclength been changed since the
>> allocate_stream
>> call?
>>
>
> Stream record looks ok but encoding object is not getting marked during GC.
>


The problem is GC mark phase.

Streams with strmtype equal to Rectype_Weakpointer or Rectype_Weakpointer
are not getting marked since SXrecord_nonweak_length() returns 0 for them!

Here is gdb output for this case:

(gdb) p /x *(Stream)0xb0000005ac0
$32 = {header = {_GCself = 0xb0000005ac0, flags = {0xb0000005ac0}},
strmtype = 0x11, strmflags = 0x41, reclength = 0x15, recxlength = 0x60,
strm_rd_by = 0x464b98,
  strm_rd_by_array = 0x464b80, strm_wr_by = 0x464b68, strm_wr_by_array =
0x464b50, strm_rd_ch = 0x462df0, strm_pk_ch = 0x45af68, strm_rd_ch_array =
0x462918,
  strm_rd_ch_last = 0x2000000000a, strm_wr_ch = 0x464b08, strm_wr_ch_array
= 0x464af0, strm_wr_ch_npnl = 0x464b08, strm_wr_ch_array_npnl = 0x464af0,
  strm_wr_ch_lpos = 0x200000000000, strm_other = 0xb0000005b38}
(gdb) p /x *(Record)0xb0000005ac0
$33 = {header = {_GCself = 0xb0000005ac0, flags = {0xb0000005ac0}}, rectype
= 0x11, recflags = 0x41, reclength = 0x6015, recdata = 0xb0000005ad0}
(gdb) p /x Rectype_Weakpointer
$34 = 0x11

And SXrecord_nonweak_length() explicitly uses Record_type() to check for
weak pointers.

This also explains why I experience this only in non-libffcall builds. With
DYNAMIC_FFI, Rectype_Weakpointer is 0x14 because of the three additional
FFI record types.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.