bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2021-01-08 Thread Mark H Weaver
Hi, Maxim Cournoyer writes: > I was recently reminded of this bug by a new encounter; at last wrote a > test for your proposed fix, and it appear to work as intended! I've > committed it on your behalf in commit 485ac28235 on the core-updates > branch. Thanks for taking care of this Maxim, and

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2021-01-08 Thread Maxim Cournoyer
Hello Mark, I was recently reminded of this bug by a new encounter; at last wrote a test for your proposed fix, and it appear to work as intended! I've committed it on your behalf in commit 485ac28235 on the core-updates branch. Closing! Thank you for the clever hack :-) Maxim

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-06-16 Thread Mark H Weaver
Hi Maxim, Maxim Cournoyer writes: > Mark H Weaver writes: > >> With the changes suggested above, I would have no objection to pushing >> this to core-updates. However, it occurs to me that we could handle the >> NUL case in a better way: >> >> Since the C regex functions that we use cannot han

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-06-16 Thread Maxim Cournoyer
Hi Mark, Mark H Weaver writes: > Hi Maxim, > > Thanks for working on this. I found a problem with this patch, > and I also have a suggestion. Please see below. > > Maxim Cournoyer writes: > >> From 9891e428eae0ed24e0d61862b3f5e298606b79eb Mon Sep 17 00:00:00 2001 >> From: Maxim Cournoyer >>

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-06-14 Thread Ludovic Courtès
Mark H Weaver skribis: > Thanks for working on this. I found a problem with this patch, > and I also have a suggestion. Please see below. I hadn’t seen Mark’s reply, which raises valid concerns. Please dismiss the message I just sent, Maxim. Ludo’.

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-06-14 Thread Ludovic Courtès
Hello Maxim, Maxim Cournoyer skribis: > l...@gnu.org (Ludovic Courtès) writes: [...] >> Otherwise LGTM. This would have to go to the next ‘core-updates’ (or >> ‘core-updates-next’ in the meantime.) >> >> Thanks! >> >> Ludo’. > > Ping. Is it the right time to merge this? Yes you can push it t

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-06-14 Thread Mark H Weaver
Hi Maxim, Thanks for working on this. I found a problem with this patch, and I also have a suggestion. Please see below. Maxim Cournoyer writes: > From 9891e428eae0ed24e0d61862b3f5e298606b79eb Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer > Date: Sun, 14 Jan 2018 20:31:33 -0500 > Subject:

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-06-13 Thread Maxim Cournoyer
l...@gnu.org (Ludovic Courtès) writes: > Maxim Cournoyer skribis: > >> From 9891e428eae0ed24e0d61862b3f5e298606b79eb Mon Sep 17 00:00:00 2001 >> From: Maxim Cournoyer >> Date: Sun, 14 Jan 2018 20:31:33 -0500 >> Subject: [PATCH] utils: Prevent substitute from crashing on files containing >> NUL

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-25 Thread Ludovic Courtès
Maxim Cournoyer skribis: > l...@gnu.org (Ludovic Courtès) writes: > >> Maxim Cournoyer skribis: >> >>> In the `patch-el-files' phase of the emacs-build-system, we find the >>> following snippet: >>> >>> (with-directory-excursion el-dir >>> ;; Some old '.el' files (e.g., tex-buf.el in A

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-24 Thread Maxim Cournoyer
l...@gnu.org (Ludovic Courtès) writes: > Maxim Cournoyer skribis: > >> In the `patch-el-files' phase of the emacs-build-system, we find the >> following snippet: >> >> (with-directory-excursion el-dir >> ;; Some old '.el' files (e.g., tex-buf.el in AUCTeX) are still encoded >> ;;

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-23 Thread Ludovic Courtès
Maxim Cournoyer skribis: > In the `patch-el-files' phase of the emacs-build-system, we find the > following snippet: > > (with-directory-excursion el-dir > ;; Some old '.el' files (e.g., tex-buf.el in AUCTeX) are still encoded > ;; with the "ISO-8859-1" locale. > (unless (fa

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-22 Thread Maxim Cournoyer
l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> Maxim Cournoyer writes: >> >>> l...@gnu.org (Ludovic Courtès) writes: >>> Maxim Cournoyer skribis: > I've encountered the following crash when trying to use substitute on a > file which contains NUL character

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-22 Thread Ludovic Courtès
Mark H Weaver skribis: > Maxim Cournoyer writes: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> Maxim Cournoyer skribis: >>> I've encountered the following crash when trying to use substitute on a file which contains NUL characters: >>> >>> Yes, that’s because Guile’s ‘regexp-exec

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-21 Thread Mark H Weaver
Maxim Cournoyer writes: > l...@gnu.org (Ludovic Courtès) writes: > >> Maxim Cournoyer skribis: >> >>> I've encountered the following crash when trying to use substitute on a >>> file which contains NUL characters: >> >> Yes, that’s because Guile’s ‘regexp-exec’ simply wraps libc’s ‘regexec’, >>

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-20 Thread Maxim Cournoyer
l...@gnu.org (Ludovic Courtès) writes: > Hi, > > Maxim Cournoyer skribis: > >> I've encountered the following crash when trying to use substitute on a >> file which contains NUL characters: > > Yes, that’s because Guile’s ‘regexp-exec’ simply wraps libc’s ‘regexec’, > which does not handle NULs.

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-01-17 Thread Ludovic Courtès
Maxim Cournoyer skribis: > From 9891e428eae0ed24e0d61862b3f5e298606b79eb Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer > Date: Sun, 14 Jan 2018 20:31:33 -0500 > Subject: [PATCH] utils: Prevent substitute from crashing on files containing > NUL chars. > > Fixes issue #30116. > > * guix/build/

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-16 Thread Ludovic Courtès
Hi, Maxim Cournoyer skribis: > I've encountered the following crash when trying to use substitute on a > file which contains NUL characters: Yes, that’s because Guile’s ‘regexp-exec’ simply wraps libc’s ‘regexec’, which does not handle NULs. We should consider switching to the pure-Scheme SRFI

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates))

2018-01-14 Thread Maxim Cournoyer
>From 9891e428eae0ed24e0d61862b3f5e298606b79eb Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 14 Jan 2018 20:31:33 -0500 Subject: [PATCH] utils: Prevent substitute from crashing on files containing NUL chars. Fixes issue #30116. * guix/build/utils.scm (substitute): Add condition to s

bug#30116: [PATCH] `substitute' crashes when file contains NUL characters (core-updates)

2018-01-14 Thread Maxim Cournoyer
Hello, I've encountered the following crash when trying to use substitute on a file which contains NUL characters: --8<---cut here---start->8--- (define problematic-file "/tmp/bp-image-data.el") scheme@(guix build utils)> ,m (guix build utils) scheme@(guix buil