jibanes has quit [Ping timeout: 265 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 258 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 265 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 265 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 264 seconds]
jibanes has joined #picolisp
aw- has quit [Quit: Leaving.]
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 272 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 246 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 272 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 258 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 246 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
aw- has joined #picolisp
aw- has left #picolisp [#picolisp]
aw- has joined #picolisp
m_mans has joined #picolisp
<
m_mans>
Regenaxer thank you for fixing readline issue!
<
Regenaxer>
Hi m_mans, tankf33der!
<
Regenaxer>
yeah, this is fixed
<
Regenaxer>
Now I'm rewriting the I/O stack structures since a few days
<
Regenaxer>
I hope it does not break completely
<
Regenaxer>
And, there is separate from this another readline issue
<
Regenaxer>
if you hit ^Z in Vip and then put it foreground again, it crashes
<
Regenaxer>
crashes in re-initializing readline
<
Regenaxer>
this is new
<
Regenaxer>
(I noticed before starting to change he I/O stacks)
<
Regenaxer>
I cannot isolate this crash from Vip
<
Regenaxer>
happens only in Vip, not in normal REPL
<
Regenaxer>
and tough to debug as it crashes in a readline lib function
<
m_mans>
Regenaxer: oh, You have no time to sit idle :)
<
Regenaxer>
true ;)
<
Regenaxer>
But good, as pil21 is nearing its completion
m_mans has quit [Ping timeout: 258 seconds]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
<
aw->
Regenaxer: hi
<
aw->
with (native) is there a result spec for signed 8-bit integer?
<
tankf33der>
no, only unsigned, you should interp it yourself
<
aw->
or i should just read B (unsigned byte) and then check myself?
<
aw->
ok ok that's what i thought
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 246 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
<
Regenaxer>
yes, just subtract 256 if it is larger than 127
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 258 seconds]
Blukunfando has quit [Read error: Connection reset by peer]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #picolisp
<
Regenaxer>
tankf33der here?
<
Regenaxer>
I'm still searching for that memory error (perhaps related to readline). Can you tell me a simple way to enable memory alloc/free-checks?
<
tankf33der>
maybe try to run under valgrind
<
Regenaxer>
Is it easy to set up?
<
Regenaxer>
how about mcheck()
<
tankf33der>
just install on debian and google to run, all on cli
<
Regenaxer>
Just insert some checks in some places would help
<
Regenaxer>
I dont want to too many changes
<
Regenaxer>
I think I try mcheck()
<
Regenaxer>
just insert a call in suspicious places
<
tankf33der>
how to repeat?
<
Regenaxer>
I have not released yet
<
Regenaxer>
in Termux it works, but on Debian I get an immediate segfault
<
Regenaxer>
in initInFile, in (alloc)
<
Regenaxer>
just ./pil
<
tankf33der>
try run
<
tankf33der>
valgrind bin/picolisp
<
Regenaxer>
but in the released version ^Z in Vip is strange too
<
Regenaxer>
perhaps related
<
Regenaxer>
A little later, I just inserted mcheck
<
Regenaxer>
test this first :)
<
tankf33der>
^Z and fg works here
<
tankf33der>
in vip
<
Regenaxer>
Here it fails both in Termux and Debian
<
Regenaxer>
We will find
<
Regenaxer>
I try valgrind
<
tankf33der>
readline 8.0.004-1
<
tankf33der>
$ pacman -Q readline
<
Regenaxer>
I think it is not readline's fault, just a symptom
<
Regenaxer>
cause now it crashes already on startup
<
Regenaxer>
before readline is started
<
Regenaxer>
hmm, mcheck() does not show an error
<
Regenaxer>
hehe, but
*with* mcheck() it does
*not* crash any longer
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
<
tankf33der>
give me sources i will try too
<
tankf33der>
just link
<
Regenaxer>
Preliminary version
<
Regenaxer>
The I/O system was heavily modified
<
Regenaxer>
so I don't want to release yet
<
tankf33der>
how to repeat ?
<
tankf33der>
just run
<
Regenaxer>
./pil crashes
<
tankf33der>
but picolisp itself is ok
<
Regenaxer>
bin/picolisp lib.l -> works
<
Regenaxer>
bin/picolisp lib.l ext.l -> crash
<
Regenaxer>
it is in when loading the files
<
Regenaxer>
in initInFile in 'repl'
<
Regenaxer>
hmm, with valgrind:
<
Regenaxer>
~/tmp/pil21 valgrind ./pil
<
Regenaxer>
==1690228== Memcheck, a memory error detector
<
Regenaxer>
==1690228== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
<
Regenaxer>
==1690228== Command: ./pil
<
Regenaxer>
==1690228== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
<
Regenaxer>
==1690228==
<
Regenaxer>
Segmentation fault
<
Regenaxer>
~/tmp/pil21
<
Regenaxer>
No diagnosis
<
tankf33der>
there is backtrace from gdb
<
Regenaxer>
yes, exactly the same here
<
Regenaxer>
very reproducible
<
Regenaxer>
always in initInFile
<
Regenaxer>
it is this line in io.l
<
Regenaxer>
(set P (alloc (val P) (inFile T))))
<
Regenaxer>
(val P) is null
<
Regenaxer>
this place was alloc'ed once, then free()d, then alloc'ed again
<
Regenaxer>
Basically the same as in old pil21
<
Regenaxer>
The damage must be somewhere before that
<
Regenaxer>
now I tried: valgrind bin/picolisp lib.l ext.l
<
Regenaxer>
I get lots of diagnoses
<
Regenaxer>
==1691726== Invalid write of size 4
<
Regenaxer>
I investigate
<
Regenaxer>
It says "Address 0x4cf92fc is 12 bytes inside a block of size 4,128 free'd"
<
Regenaxer>
It is correct that the allocated structure is 4128 bytes
<
Regenaxer>
'inFile' struct
<
Regenaxer>
but does that mean that the block is freed already?
<
tankf33der>
unknown.
<
Regenaxer>
Something is definitely wrong here
<
Regenaxer>
Probably free'd too often ;)
<
Regenaxer>
I think I know what it is
<
Regenaxer>
line 619 in src/io.l
<
Regenaxer>
(when (Io: pid)
<
Regenaxer>
it calls (closeInFile (In: fd))
<
Regenaxer>
which is correct
<
Regenaxer>
closes the file and free's
<
Regenaxer>
later: (In: chr (val $Chr))
<
Regenaxer>
it stores the char in the free'd struct
<
Regenaxer>
so the 'when' above must be converted to an 'ifn'
<
Regenaxer>
*either* save the char
*or* free the buffer
<
Regenaxer>
619c619,620
<
Regenaxer>
< (when (Io: pid)
<
Regenaxer>
> (ifn (Io: pid)
<
Regenaxer>
> (In: chr (val $Chr))
<
Regenaxer>
624d624
<
Regenaxer>
< (In: chr (val $Chr))
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
<
Regenaxer>
Great! Now it seems better
<
Regenaxer>
tests pass
<
Regenaxer>
I valgrind again
<
Regenaxer>
Looks very good now. No complaints it seems
<
Regenaxer>
BUT: Vip still crashes after 'fg'
<
tankf33der>
give me sources again, i will run tests
<
Regenaxer>
uploaded to pub/
<
Regenaxer>
In any case, thanks for the valgrind tip! Nice and easy tool
<
Regenaxer>
was too lazy to try it :)
<
Regenaxer>
Concerning Vip:
<
Regenaxer>
: (vi 'car) # works fine with ^Z here to
<
Regenaxer>
the problem is if I start vip from the shell
<
Regenaxer>
$ ./pil bin/vip lib.l
<
Regenaxer>
then ^Z
<
Regenaxer>
I have something like that in a script 'vi' in my search path
<
tankf33der>
ignore
<
tankf33der>
((1 4 2 4 4 4 6 4 8 4 10 4 12 4 14 4 16 4 18 4 20 6 109 6 105 6 107 6 101 3))
<
tankf33der>
[lists.l:10] NIL -- 'test' failed
<
tankf33der>
builtin ok, mine failed.
<
tankf33der>
want to know where ?
<
Regenaxer>
which function?
<
Regenaxer>
Probably 'pipe'
<
Regenaxer>
'pipe' changed due to the new I/O structs
jibanes has quit [Ping timeout: 240 seconds]
<
Regenaxer>
I can reproduce
jibanes has joined #picolisp
<
Regenaxer>
BTW, the changes for the I/O structs are not finished yet
<
Regenaxer>
The main reason was co and yield, which need this information for correct context switch
<
Regenaxer>
Will do that soon
<
Regenaxer>
But first 'pipe'
<
Regenaxer>
and Vip ^Z I hope
<
Regenaxer>
Thanks tankf33der!
jibanes has quit [Ping timeout: 264 seconds]
jibanes has joined #picolisp
<
Regenaxer>
I give up for today
<
Regenaxer>
fresh mind tomorrow
jibanes has quit [Ping timeout: 265 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 264 seconds]
jibanes has joined #picolisp
beneroth_ has quit [Quit: Leaving]
beneroth has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 258 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 246 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #picolisp