~leon_plickat/public-inbox

riverguile -- a bug (XDG_CONFIG_HOME); suggestion (Makefile) query (attaching a repl)

Stephen J. Eglen <sje30@cam.ac.uk>
Details
Message ID
<87jzp29mzj.fsf@cam.ac.uk>
DKIM signature
missing
Download raw message
Hi,

Thanks very much for all your work with river.  I'm finding it great
to experiment with.  stacktile is working well, and I thought I'd try
riverguile to scratch an itch with interaction between river and Emacs
via a guile repl.  

1. I think I found a small bug in riverguile.  It compiles okay, but when
I run it, I get the following backtrace (via gdb):

free(): double free detected in tcache 2                                                
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)
    at ./nptl/pthread_kill.c:44
Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) where
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)
    at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>)
    at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ./nptl/pthread_kill.c:89
#3  0x00007ffff7c42866 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff7c268b7 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff7c27750 in __libc_message (fmt=fmt@entry=0x7ffff7dc3b34 "%s\n")
    at ../sysdeps/posix/libc_fatal.c:150
#6  0x00007ffff7ca3c67 in malloc_printerr (
    str=str@entry=0x7ffff7dc6b50 "free(): double free detected in tcache 2")
    at ./malloc/malloc.c:5765
#7  0x00007ffff7ca6089 in _int_free (av=0x7ffff7dfeca0 <main_arena>, 
    p=<optimized out>, have_lock=0) at ./malloc/malloc.c:4534
#8  0x00007ffff7ca87f3 in __GI___libc_free (mem=<optimized out>)
    at ./malloc/malloc.c:3391
#9  0x0000555555557737 in get_script_path () at riverguile.c:378
#10 0x0000555555557937 in main (argc=1, argv=0x7fffffffde48) at riverguile.c:417
(gdb) quit

I do have a script in ~/.config/river/layout.scm and if I comment out
the following two lines

		/* { .fmt = "%s/riverguile/layout.scm",         .needs_env = true,  .env = getenv("XDG_CONFIG_HOME") }, */
		/* { .fmt = "%s/river/layout.scm",              .needs_env = true,  .env = getenv("XDG_CONFIG_HOME") }, */

then riverguile works fine (thank you).

I do not have XDG_CONFIG_HOME set (my machine is Ubuntu 23.10, and I
am not aware of having unset this variable.)

2. In Makefile line 44:

	$(RM) $(IMG)

there is no IMG variable, so perhaps that line could be deleted

3. Do you know if there is a way to connect a repl to the guile
process that riverguile is running?  In Emacs, I can do something like
geiser-connect to attach a repl to a guile process if the process has
opened a port (using --listen=PORT flag).  I can't see how to do that
here however.  

Best wishes, Stephen
Reply to thread Export thread (mbox)