bug#46220: Fwd: Some non-standard O_* flags are missing

2021-01-31 Thread Maxime Devos
) on systems where they are defined? Greetings, Maxime -- Maxime Devos PGP Key: C1F3 3EE2 0C52 8FDB 7DD7 011F 49E3 EE22 1917 25EE Freenode handle: mdevos signature.asc Description: This is a digitally signed message part --- End Message --- signature.asc Description: This is a digitally signed

bug#46232: ‘Wrong type argument ...’ exception when printing backtrace after interrupt

2021-02-01 Thread Maxime Devos
Hi guilers! When entering sleeping code in the REPL, then interrupting it (C-c) and entering ,bt twice, I receive an error message from ,bt: GNU Guile 3.0.5 [...] Enter `,help' for help. scheme@(guile-user)> (let ((mu (make-mutex))) (with-mutex mu (wait-condition-variable

bug#46230: When are spurious wakeups of condition variables possible?

2021-02-01 Thread Maxime Devos
:. -- Maxime Devos PGP Key: C1F3 3EE2 0C52 8FDB 7DD7 011F 49E3 EE22 1917 25EE Freenode handle: mdevos signature.asc Description: This is a digitally signed message part

bug#46258: openat, chownat, ... in Guile?

2021-02-02 Thread Maxime Devos
Hi guilers, I would like to see fchownat, openat, fchmodat and any *at variants I forgot to appear in future versions of Guile in some form. I have two proposals, which I will illustrate with the procedure 'chmod': * chmod can currently modify permissions of a file. This OBJECT argument

bug#48318: (ice-9 match) does not allow distinguishing between () and #nil

2021-05-13 Thread Maxime Devos
Taylan Kammer schreef op do 13-05-2021 om 21:14 [+0200]: > Hi Maxime, > > I believe that match conflating () and #nil is the right thing, > even if the current implementation does it unintentionally. > > Those two values should be considered "the same" in most situations > even though (eqv? #nil

bug#48315: (ice-9 match) does not suport #nil

2021-05-09 Thread Maxime Devos
guile --version: guile (GNU Guile) 3.0.5 (use-modules (ice-9 match)) (match #nil (_ 'xyzzy)) --> While compiling expression: Syntax error: unknown location: unexpected syntax in form () (match '() (_ 'xyzzy)) --> $16 = xyzzy Greetings, Maxime. signature.asc Description: This is a digitally

bug#48318: (ice-9 match) does not allow distinguishing between () and #nil

2021-05-09 Thread Maxime Devos
Hi guilers, I've found the following surprising behaviour: (use-modules (ice-9 match)) (match (identity #nil) (() 'scheme-eol) (#nil 'elisp-eol)) --> scheme-eol, expected elisp-eol (match '() (#nil 'elisp-eol) (() 'elisp-eol)) --> elisp-eol, expected scheme-eol Treating () and #nil as

bug#48449: no such language tree-il (after interrupt in REPL)

2021-05-15 Thread Maxime Devos
GNU Guile 3.0.5 Copyright (C) 1995-2021 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help.

bug#48448: 'procedure-name' returns #f if name is #{}# (the empty symbol)

2021-05-15 Thread Maxime Devos
guile --version: 3.0.5 In a REPL: (let ((#{}# (lambda () 0)) (something-else (lambda () 0))) (map procedure-name (list #{}# something-else))) --> $20 (#f someting-else) signature.asc Description: This is a digitally signed message part

bug#48563: move->fdes somewhat broken (EBADFD)

2021-05-21 Thread Maxime Devos
version: 3.0.5 Reproducer: a.scm: (define (test p) (let loop ((i 0)) (when (< (pk 'i i) 40) (move->fdes p i) (loop (+ 1 i) (test (car (pipe)) Run guile -l a.scm. The result is non-deterministic. Output (try #1--#2): ;;; (i 0) [...] ;;; (i 9) Backtrace: In

bug#48566: call-with-blocked-asyncs does not like escape continuations

2021-05-21 Thread Maxime Devos
Version: 3.0.5 (as found on Guix System, on a x86-64 system) Here is a minimal reproducer. (use-modules (ice-9 control)) (define (test) (define (safe-point) (call-with-unblocked-asyncs (lambda () 'hi))) (let/ec ec (call-with-blocked-asyncs (lambda () (system-async-mark ec)

bug#48565: Using move->fdes to move stdin to 9 + interrupt (C-c) exits guile

2021-05-21 Thread Maxime Devos
user@hostname ~$ guile GNU Guile 3.0.5 Copyright (C) 1995-2021 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter

bug#48422: Cannot print backtrae from system-async-mark

2021-05-14 Thread Maxime Devos
Severity: minor Hi guilers, I have some trouble making backtraces with system-async-mark. (Not encountered in ‘real code’, only when playing with the REPL.) From a REPL: scheme@(guile-user)> (system-async-mark backtrace ) Backtrace: Exception thrown while printing backtrace: In procedure

bug#48712: (is-a? #nil ) --> #f (oop goops)

2021-05-28 Thread Maxime Devos
I want to make sure some Scheme code using (oop goops) can be used from elisp. The method I'm defining is something like this (overly simplified): ;; TODO: Define a instead of working with raw integers? (define-method (send-message! (msg ) (data ) (remote )) [ write data to msg ] [ call

bug#49363: eof-object? is not exported from (ice-9 binary-ports)

2021-07-03 Thread Maxime Devos
According to the manual: 6.12.2 Binary I/O - [...] To use these routines, first include the binary I/O module: (use-modules (ice-9 binary-ports)) [...] The end-of-file object is unlike any other kind of object: it’s not a pair, a symbol, or anything else. To check

bug#49311: (null?) cannot be compiled (error from (language typs types))

2021-07-01 Thread Maxime Devos
Hi, While hacking on Guix, I encountered the following backtace: In system/base/compile.scm: 265:44 19 (_ _ _) 261:33 18 (_ _ #) In language/cps/optimize.scm: 128:12 17 (_ _ _) 87:0 16 (optimize-higher-order-cps _ _) In language/cps/dce.scm: 430:33 15 (eliminate-dead-code _)

bug#49311: (null?) cannot be compiled (error from (language typs types))

2021-07-01 Thread Maxime Devos
Dr. Arne Babenhauserheide schreef op do 01-07-2021 om 13:44 [+0200]: > Maxime Devos writes: > > scheme@(guile-user)> (null?) > > ;;; :1:0: warning: possibly wrong number of arguments to `null?' > > This is a correct warning: null? requires an argument (the list

bug#49363: eof-object? is not exported from (ice-9 binary-ports)

2021-07-04 Thread Maxime Devos
Linus Björnstam schreef op zo 04-07-2021 om 07:54 [+0200]: > Isn't eof-object? available in the default environment? Yes, but I use (define-library ...) and (library ...) forms instead of (define-module (...) ...) forms. When using define-library or library, the ‘default’ environment is ignored.

bug#46258: Potential security weakness in Guix services

2021-02-05 Thread Maxime Devos
On Fri, 2021-02-05 at 13:20 +0100, Maxime Devos wrote: > On Fri, 2021-02-05 at 10:57 +0100, Ludovic Courtès wrote: > > [...] > [...] > > I'll try to implement this API in Scheme (using the FFI), and post > it at https://notabug.org/mdevos/things. I'll post a follow-up

bug#46220: Fwd: Some non-standard O_* flags are missing

2021-03-09 Thread Maxime Devos
I forgot to include O_PATH, which (in combination with O_NOFOLLOW) is required for opening a symbolic link. See revised patch in attachment. From d769a75962c64804f354a0133494491626b8b2dc Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 2 Mar 2021 18:03:22 +0100 Subject: [PATCH] Define

bug#46220: Some non-standard O_* flags are missing

2021-03-02 Thread Maxime Devos
ms orthogonal to this bug (well, feature request), though. Greetings, Maxime. From 885c0886295eded82188c32b3b5ae52dd08b306c Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 2 Mar 2021 18:03:22 +0100 Subject: [PATCH] Define `O_NOFOLLOW' and various other flags when supported. MIME-Version: 1.0 Conte

bug#39954: bug#50153: Acknowledgement (call-with-values outside tail position + backtrace + compilation causes segfault)

2021-08-22 Thread Maxime Devos
I did some debugging on the C side, using 'rr': LD_LIBRARY_PATH=.libs ../meta/uninstalled-env rr record ./.libs/guile --fresh-auto-compile -l ../crash.scm it leads to a segfault, as expected. According to #39954, which looks similar, 'frame-local-ref' returns (SCM)0x0. So I tried some reverse

bug#50153: call-with-values outside tail position + backtrace + compilation causes segfault

2021-08-21 Thread Maxime Devos
Hi guilers, Write the following to "crash.scm": > (call-with-values backtrace list) > #t (the trailing #t is important) and run > # --auto-compile works too, but --no-auto-compile doesn't cause a crash > guile --fresh-auto-compile -l crash.scm it will segfault during the printing of the

bug#50153: Acknowledgement (call-with-values outside tail position + backtrace + compilation causes segfault)

2021-08-21 Thread Maxime Devos
This looks rather similar to 39...@debbugs.gnu.org, looking at the backtrace from GDB, maybe the cause is the same? Thread 1 "guile" received signal SIGSEGV, Segmentation fault. 0x77f40f3f in scm_is_values (x=) at values.h:30 30return SCM_HAS_TYP7 (x, scm_tc7_values); (gdb) bt #0

bug#50608: Fix for ‘, trace (method ()) --> no applicable method for ...’

2021-09-15 Thread Maxime Devos
Hi guile, Attached is a fix for <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50608> and a similar issue for 'procedure-name'. Greetings, Maxime. From fe518ed4fb2c7e55f69a229349e3183ccfdcfc97 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Wed, 15 Sep 2021 19:57:20 +0200 Subject: [PAT

bug#50608: ,trace (method ()) --> no applicable method for ...

2021-09-15 Thread Maxime Devos
Hi guile, Try running the following from a repl: (use-modules (oop goops)) (method ()) ;; --> $1 = #< () 7fbb1bcb47c0> ,trace (method ()) ---> [...] trace: | | (_ #< 7fbb1bc67c80> (#:specializers () #:formals () #:body ((if #f …)) …)) trace: | | | (struct-ref/unboxed #< 7fbb1bc67c80> 5)

bug#49623: [PATCH v2] Parse #{{}}# properly.

2021-07-20 Thread Maxime Devos
Maxime Devos schreef op zo 18-07-2021 om 21:47 [+0200]: > It turns out that the test fails when the patch > is applies to guile@3.0.7. I'll rebase and try > to figure things out. With the revised patch, tests succeed and the Guile library now compiles successfully. Greetings, Max

bug#49623: [PATCH] Parse #{{}}# properly.

2021-07-18 Thread Maxime Devos
2001 From: Maxime Devos Date: Sun, 18 Jul 2021 19:59:32 +0200 Subject: [PATCH] ice-9/read: Parse #{}}# properly. This is a regression since Guile 3.0.2 and breaks compilation of a Guile library. * module/ice-9/read.scm (%read)[read-parenthesized]: When 'saw-brace?' is #t, do not reset 'saw

bug#49623: Fwd: [PATCH] Parse #{{}}# properly.

2021-07-18 Thread Maxime Devos
It turns out that the test fails when the patch is applies to guile@3.0.7. I'll rebase and try to figure things out. signature.asc Description: This is a digitally signed message part

bug#49623: Guile 3.0.7 can't read #{{}}#

2021-07-18 Thread Maxime Devos
Hi, A scheme library I'm working on now fails to compile after switching from 3.0.2 to Guile 3.0.7. The issue is that Guile can't read #{{}}# anymore. In guile 3.0.7: scheme@(guile-user)> '#{{}}# }# $1 = #{\x7b;\x7d;# }# ; the }# should result in a syntax error scheme@(guile-user)> '#{{}}# ;

bug#45788: ‘non-revealed port is closed’ test case is already fixed

2021-07-19 Thread Maxime Devos
Hi guilers and guix, I (and some other people) encountered this bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43521#11 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45788 https://issues.guix.gnu.org/48389#8 There is already a fix: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43521#11

bug#52559: guix pull fails with `Unknown command: nix fish: nix show-derivation "~/.fr-sqOEpp/....-module-import-compiled.drv"

2022-01-17 Thread Maxime Devos
reopen 52559 reassign 52559 guile retitle 52559 Guile doesn't like carriage returns after \ thanks (I thought I renamed it already?) Grigory Shepelev schreef op ma 17-01-2022 om 22:37 [+0300]: > Same problem is: > Computing Guix derivation for 'x86_64-linux'... |ice- > 9/read.scm:126:4: In

bug#54272: Avoid producing ? in locales with too few characters.

2022-03-06 Thread Maxime Devos
This seems difficult to test. Any ideas? From 8f9a8e56cc3e8496fdfed3f889cff9fca19b3663 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 6 Mar 2022 12:51:33 + Subject: [PATCH 2/2] Deprecate non-functional bind-textdomain-codeset. TODO: this only deprecated it in the documentation

bug#46258: bug#54485: [PATCH] gnu: Add guile-with-openat.

2022-03-24 Thread Maxime Devos
Ludovic Courtès schreef op do 24-03-2022 om 12:37 [+0100]: > Instead, I would prefer to actually review and apply the patches > upstream.  I’ve been meaning to do that, really, but it requires a chunk > of time and focus, which keeps leading me to postpone. OK. I can relate, w.r.t. the IPFS

bug#43521: ports.test "non-revealed port is closed" breaks other tests

2022-03-20 Thread Maxime Devos
Looks like it has been resolved now, see the commit by Rob Browing: Do we close the issue now, or only at the next release? Thanks, Maxime. signature.asc Description: This is a digitally signed

bug#53898: The module name for using weak vectors is undocumented.

2022-02-09 Thread Maxime Devos
Hi, Weak vectors are documented in ‘6.17.3.2 Weak vectors’. However, they are not available from the (guile) module and that section does not document which module needs to be imported to use the procedures from that section. I only found the required module (ice-9 weak-vector) by doing $ git

bug#56751: Protocol of parent record type is ignored

2022-07-24 Thread Maxime Devos
(import (rnrs records syntactic)         (rnrs base)) (define-record-type     (#{I have one field, but no need to set it, I'll do it myself}# make-1 type-1?)   (fields (immutable #{field with a fixed value}# #{get first field value}#))   (protocol    (lambda (%make) (lambda ()   

bug#49232: [PATCH] load-foreign-library: perform substring match on library files

2022-07-23 Thread Maxime Devos
On 23-07-2022 13:09, soe...@soeren-tempel.net wrote: From: Sören Tempel This patch is a fix for bug #49232 [1]. To summarize this bug, the current load-foreign-library implementation does not load versioned sonames (e.g. libfoo.so.5) which are common on Linux. This is an issue for us at Alpine

bug#49232: [PATCH] load-foreign-library: perform substring match on library files

2022-08-20 Thread Maxime Devos
On 20-08-2022 15:52, Sören Tempel wrote: Hi, How do we proceed with this? I would especially be interested in the "patching" that you do in Guix. Maybe that would also be a suitable workaround for us on the Alpine side until this is sorted out properly. Greetings, Sören Eventually, an

bug#49232: [PATCH] load-foreign-library: perform substring match on library files

2022-08-20 Thread Maxime Devos
On 24-07-2022 14:16, Sören Tempel wrote: Hi, Thanks for your feedback, comments below. Maxime Devos wrote: Long term, I think it would be ideal for Guile to decide upon a major version (and maybe even location, depending on the choices of the distro) at _compile_ time instead of runtime

bug#58154: fluid-ref* with negative index segfaults

2022-09-28 Thread Maxime Devos
antipode@antipode ~$ guile -c '(fluid-ref* (make-fluid) -1)' Backtrace: In ice-9/boot-9.scm: 1752:10 6 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 5 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 4 (call-with-prompt ("prompt") # …) In ice-9/eval.scm: 619:8 3

bug#27782: patch for mmap and friends

2023-01-14 Thread Maxime Devos
On 14-01-2023 01:49, Matt Wette wrote: Please consider this patch for adding mmap(), munmap() and msync()  to libguile/filesys.c.  Included is update for posix.texi and test file mman.test. Once included, feature 'mman should be #t. Matt + if (SCM_UNBNDP (fd)) +c_fd = -1; +

bug#63279: Segfault when printing a call-with-values stack frame in backtrace

2023-05-07 Thread Maxime Devos
Hello there, Guile seems to segfault when trying to print certain backtraces with a 'call-with-values' stack frame. Here's a minimal reproducer program: (symbol? (call-with-values (lambda () (error 'oh-no)) list)) Here is a more minimal reproducer, from

bug#43521: ports.test "non-revealed port is closed" breaks other tests

2023-12-04 Thread Maxime Devos
Quoting myself, as this message appears to have been ignored for 1 year and 258 days: Looks like it has been resolved now, see the commit by Rob Browing: Do we close the issue now, or only at the

bug#46009: exception from inside false-if-exception?

2024-04-29 Thread Maxime Devos
[Adding Andy Wingo because of the stack shenanigans] >Subject: exception from inside false-if-exception? Duplicate of #46009 - (backtrace) crash, string->number: Wrong type argument in position 1 (expecting string): #f - GNU bug report logs >the expression pointed to by debug.scm,72:40 is