bug#46796: Cuirass & pointer finalization.

2023-11-23 Thread Ludovic Courtès
Hi, Mathieu Othacehe skribis: > I'm trying to fix a memory corruption in the remote-server process of > Cuirass since a few days. Even though I don't have a usable core dump > file yet, I'm pretty sure the error comes from the "zmq-msg-init" > procedure of Guile-Simple-ZMQ. I’m closing this old

bug#46796: Cuirass & pointer finalization.

2021-03-08 Thread Ludovic Courtès
Hi, Mathieu Othacehe skribis: >> Hmm I think the bytevector and the pointer object can be finalized in >> the same GC cycle; when that happens, you have no guarantee as to the >> order in which they are finalized. > > That would explain the crashes indeed. > >> But… is it really similar to your

bug#46796: Cuirass & pointer finalization.

2021-03-02 Thread Mathieu Othacehe
Hey, > Hmm I think the bytevector and the pointer object can be finalized in > the same GC cycle; when that happens, you have no guarantee as to the > order in which they are finalized. That would explain the crashes indeed. > But… is it really similar to your ZMQ issue? There you had message

bug#46796: Cuirass & pointer finalization.

2021-03-02 Thread Ludovic Courtès
Hi! Mathieu Othacehe skribis: > I have written a small reproducer of the situation: > > (use-modules (system foreign) > (rnrs bytevectors)) > > (define close > (dynamic-func "test_close" (dynamic-link "/home/mathieu/tmp/libtest"))) > > (let loop () > (let* ((bv (make-bytevector

bug#46796: Cuirass & pointer finalization.

2021-03-02 Thread Mathieu Othacehe
Hey Ludo, Many thanks for your help here, it feels great to have your support as always. > First, is this function idempotent? (Is it OK to close an msg_t > multiple times.) The zmq_msg_close function is mostly responsible of freeing the memory allocated by ZMQ to store the data associated wi

bug#46796: Cuirass & pointer finalization.

2021-03-01 Thread Ludovic Courtès
Hi! Mathieu Othacehe skribis: > Here's a Valgrind backtrace: > > ==97844== Thread 17: > ==97844== Invalid read of size 4 > ==97844==at 0x114465B9: zmq::msg_t::close() (in > /gnu/store/zd9lbfqa3170nsfd4177dnr38k1sjbnc-zeromq-4.3.4/lib/libzmq.so.5.2.4) First, is this function idempotent? (I

bug#46796: Cuirass & pointer finalization.

2021-02-27 Thread Mathieu Othacehe
Hello zimoun, > and why is ’zmq-message-content’ used for? Since ’message’ is > initialized with zero, I guess. Well, I am confused by: > > (let ((content-ptr (zmq_msg_data (message->pointer message))) > [...] > (pointer->bytevector content-ptr size > > … > > (let ((msg (

bug#46796: Cuirass & pointer finalization.

2021-02-27 Thread Mathieu Othacehe
Hey, Here's a Valgrind backtrace: --8<---cut here---start->8--- ==97844== Thread 17: ==97844== Invalid read of size 4 ==97844==at 0x114465B9: zmq::msg_t::close() (in /gnu/store/zd9lbfqa3170nsfd4177dnr38k1sjbnc-zeromq-4.3.4/lib/libzmq.so.5.2.4) ==97844==

bug#46796: Cuirass & pointer finalization.

2021-02-26 Thread zimoun
Hi Mathieu, I know nothing about the topic and I probably out-of-scope. On Fri, 26 Feb 2021 at 15:14, Mathieu Othacehe wrote: > I'm trying to fix a memory corruption in the remote-server process of > Cuirass since a few days. Even though I don't have a usable core dump > file yet, I'm pretty su

bug#46796: Cuirass & pointer finalization.

2021-02-26 Thread Mathieu Othacehe
Hello, I'm trying to fix a memory corruption in the remote-server process of Cuirass since a few days. Even though I don't have a usable core dump file yet, I'm pretty sure the error comes from the "zmq-msg-init" procedure of Guile-Simple-ZMQ. This procedure creates a bytevector, call the C fun