all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64
@ 2021-03-22  1:27 Paul Eggert
  2021-03-22  8:54 ` Michael Albinus
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paul Eggert @ 2021-03-22  1:27 UTC (permalink / raw)
  To: 47307

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

I configured Emacs 27.2 RC2 on macOS 11.2 ARM64 (arm-apple-darwin20.3.0) 
using "./configure --with-gnutls=ifavailable" (plain "./configure" 
failed, which was disconcerting). When I ran "make" the compiler complained:

editfns.c:2063:18: warning: unsequenced modification and access to 
'sa_avail' [-Wunsequenced]

This correctly diagnoses undefined behavior in that C function. I didn't 
investigate what happens on that platform is as it's easier to fix the 
problem on all platforms. I propose installing the attached 
obviously-safe patch into the emacs-27 branch.

There were several deprecation warnings when compiling but I assume we 
don't care about them in this older branch.

"make check" reported four unexpected failures. Perhaps a macOS expert 
could be persuaded to look into them. A tarball of the failed logs is 
attached.

[-- Attachment #2: 0001-Fix-replace-buffer-contents-undefined-behavior.patch --]
[-- Type: text/x-patch, Size: 1496 bytes --]

From f85db942100f4a129d4b9efba5707b954cbf2121 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 21 Mar 2021 18:08:13 -0700
Subject: [PATCH] Fix replace-buffer-contents undefined behavior

* src/editfns.c (Freplace_buffer_contents): Avoid undefined
behavior with competing side effects in parallel subexpressions.
Problem reported by Apple clang version 12.0.0 (clang-1200.0.32.29).
---
 src/editfns.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/editfns.c b/src/editfns.c
index 621e35171d..cd9633d4c6 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2053,6 +2053,8 @@ DEFUN ("replace-buffer-contents", Freplace_buffer_contents,
      code.  */
   ptrdiff_t del_bytes = (size_t) size_a / CHAR_BIT + 1;
   ptrdiff_t ins_bytes = (size_t) size_b / CHAR_BIT + 1;
+  unsigned char *deletions = SAFE_ALLOCA (del_bytes);
+  unsigned char *insertions = SAFE_ALLOCA (ins_bytes);
   struct context ctx = {
     .buffer_a = a,
     .buffer_b = b,
@@ -2060,8 +2062,8 @@ DEFUN ("replace-buffer-contents", Freplace_buffer_contents,
     .beg_b = min_b,
     .a_unibyte = BUF_ZV (a) == BUF_ZV_BYTE (a),
     .b_unibyte = BUF_ZV (b) == BUF_ZV_BYTE (b),
-    .deletions = SAFE_ALLOCA (del_bytes),
-    .insertions = SAFE_ALLOCA (ins_bytes),
+    .deletions = deletions,
+    .insertions = insertions,
     .fdiag = buffer + size_b + 1,
     .bdiag = buffer + diags + size_b + 1,
     .heuristic = true,
-- 
2.27.0


[-- Attachment #3: emacs-27.2-RC2-failures-macOS11.2-ARM.tar.gz --]
[-- Type: application/gzip, Size: 4677 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64
  2021-03-22  1:27 bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64 Paul Eggert
@ 2021-03-22  8:54 ` Michael Albinus
  2021-03-22 16:23   ` Paul Eggert
  2021-03-22 16:59 ` Philipp Stephani
  2021-03-22 17:20 ` Eli Zaretskii
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2021-03-22  8:54 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 47307

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

Paul Eggert <eggert@cs.ucla.edu> writes:

Hi Paul,

> "make check" reported four unexpected failures. Perhaps a macOS expert
> could be persuaded to look into them. A tarball of the failed logs is
> attached.

1 unexpected results:
   FAILED  tramp-test35-remote-path

This fails for a rather edge case being tested. It shouldn't stop the
release of Emacs 27.2.

For further analysis, could you please apply the appended patch, and
rerun tramp-tests? The resulting log file shall tell us more.

Thanks, and best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1177 bytes --]

*** /tmp/ediffac90LC	2021-03-22 09:50:44.593344644 +0100
--- /home/albinus/src/emacs-27/test/lisp/net/tramp-tests.el	2021-03-22 09:50:29.844380792 +0100
***************
*** 5030,5035 ****
--- 5030,5036 ----
    ;; Since Emacs 27.1.
    (skip-unless (fboundp 'exec-path))

+   (tramp--test-instrument-test-case 10
    (let* ((tmp-name (tramp--test-make-temp-name))
  	 (default-directory tramp-test-temporary-file-directory)
           (orig-exec-path (with-no-warnings (exec-path)))
***************
*** 5083,5089 ****
         (tramp-dissect-file-name tramp-test-temporary-file-directory)
         'keep-debug 'keep-password)
        (setq tramp-remote-path orig-tramp-remote-path)
!       (ignore-errors (delete-directory tmp-name 'recursive)))))

  (ert-deftest tramp-test36-vc-registered ()
    "Check `vc-registered'."
--- 5084,5090 ----
         (tramp-dissect-file-name tramp-test-temporary-file-directory)
         'keep-debug 'keep-password)
        (setq tramp-remote-path orig-tramp-remote-path)
!       (ignore-errors (delete-directory tmp-name 'recursive))))))

  (ert-deftest tramp-test36-vc-registered ()
    "Check `vc-registered'."

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64
  2021-03-22  8:54 ` Michael Albinus
@ 2021-03-22 16:23   ` Paul Eggert
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggert @ 2021-03-22 16:23 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 47307

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

On 3/22/21 1:54 AM, Michael Albinus wrote:

> For further analysis, could you please apply the appended patch, and
> rerun tramp-tests? The resulting log file shall tell us more.

Sure, updated log file compressed and attached.

[-- Attachment #2: tramp-tests.log.gz --]
[-- Type: application/gzip, Size: 105077 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64
  2021-03-22  1:27 bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64 Paul Eggert
  2021-03-22  8:54 ` Michael Albinus
@ 2021-03-22 16:59 ` Philipp Stephani
  2021-03-23  8:40   ` Michael Albinus
  2021-03-22 17:20 ` Eli Zaretskii
  2 siblings, 1 reply; 7+ messages in thread
From: Philipp Stephani @ 2021-03-22 16:59 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 47307

Am Mo., 22. März 2021 um 02:28 Uhr schrieb Paul Eggert <eggert@cs.ucla.edu>:
> "make check" reported four unexpected failures. Perhaps a macOS expert
> could be persuaded to look into them. A tarball of the failed logs is
> attached.

I think all these failures are covered by other bug reports, and they
are marked as fixed, so if necessary, the fixes could be backported:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42538
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42533
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42537
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37615





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64
  2021-03-22  1:27 bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64 Paul Eggert
  2021-03-22  8:54 ` Michael Albinus
  2021-03-22 16:59 ` Philipp Stephani
@ 2021-03-22 17:20 ` Eli Zaretskii
  2021-03-25 15:16   ` Paul Eggert
  2 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-03-22 17:20 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 47307

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Sun, 21 Mar 2021 18:27:32 -0700
> 
> I configured Emacs 27.2 RC2 on macOS 11.2 ARM64 (arm-apple-darwin20.3.0) 
> using "./configure --with-gnutls=ifavailable" (plain "./configure" 
> failed, which was disconcerting). When I ran "make" the compiler complained:
> 
> editfns.c:2063:18: warning: unsequenced modification and access to 
> 'sa_avail' [-Wunsequenced]
> 
> This correctly diagnoses undefined behavior in that C function. I didn't 
> investigate what happens on that platform is as it's easier to fix the 
> problem on all platforms. I propose installing the attached 
> obviously-safe patch into the emacs-27 branch.

I'm okay with installing this on the emacs-27 branch, but please wait
until Emacs 27.2 is released (in a few days, fingers crossed), as I
see no reason to delay 27.2 due to this issue.

Thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64
  2021-03-22 16:59 ` Philipp Stephani
@ 2021-03-23  8:40   ` Michael Albinus
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Albinus @ 2021-03-23  8:40 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: 47307, Paul Eggert

Philipp Stephani <p.stephani2@gmail.com> writes:

Hi Philipp,

> I think all these failures are covered by other bug reports, and they
> are marked as fixed, so if necessary, the fixes could be backported:
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42538

Indeed, the Tramp error reported by Paul looks similar to this. But
bug#42538 is reported to be fixed already in both Emacs 27.2 and 28.1,
and the traces I've got from Paul look also different. So I will poke
around whether I could find something else.

But again, there's no reason to delay Emacs 27.2. due to this Tramp error.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64
  2021-03-22 17:20 ` Eli Zaretskii
@ 2021-03-25 15:16   ` Paul Eggert
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggert @ 2021-03-25 15:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 47307-done

On 3/22/21 10:20 AM, Eli Zaretskii wrote:
> I'm okay with installing this on the emacs-27 branch, but please wait
> until Emacs 27.2 is released

OK, done, and closing the bug report.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-25 15:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-22  1:27 bug#47307: Emacs 27.2 RC2 build/check issues on macOS ARM64 Paul Eggert
2021-03-22  8:54 ` Michael Albinus
2021-03-22 16:23   ` Paul Eggert
2021-03-22 16:59 ` Philipp Stephani
2021-03-23  8:40   ` Michael Albinus
2021-03-22 17:20 ` Eli Zaretskii
2021-03-25 15:16   ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.