GNU bug report logs - #58771
29.0.50; context submenu can not click when run emacs lucid build.

Previous Next

Package: emacs;

Reported by: Feng Shu <tumashu <at> 163.com>

Date: Tue, 25 Oct 2022 05:45:01 UTC

Severity: normal

Merged with 57320, 57518, 59733

Found in version 29.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mike Kupfer <kupfer <at> rawbw.com>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Feng Shu <tumashu <at> 163.com>, Stephen Berman <stephen.berman <at> gmx.net>, 58771 <at> debbugs.gnu.org
Subject: bug#58771: 29.0.50; context submenu can not click when run emacs lucid build.
Date: Tue, 10 Jan 2023 22:57:25 -0800
Visuwesh wrote:

> Isn't this yet another duplicate of bug#57320?

Looks like it, yes.

> IME, this bug goes away when you re-./configure Emacs so there's no
> surprise this disappeared in your case.

I don't even need to rerun configure.  I just added a debug fprintf to
pop_up_menu(), rebuilt Emacs, and the problem vanished.

I still have the binary that fails.  On a hunch, I added a breakpoint at
the start of pop_up_menu().  When the breakpoint triggered, I checked
the value of lucid__menu_grab_keyboard.  gdb says

(gdb) print lucid__menu_grab_keyboard
$2 = false

Yet *Help* says that the value of lucid--menu_grab_keyboard is t.

If I do 

  M-: (setq lucid--menu_grab_keyboard t)

and press F10, gdb says lucid__menu_grab_keyboard is still false.

I did a little more poking around with gdb and found that
lucid__menu_grab_keyboard moves around inside "globals".

Broken binary:

(gdb) print &globals.f_lucid__menu_grab_keyboard
$3 = (_Bool *) 0x555555d54a98 <globals+4152>

Working binary:

(gdb) print &globals.f_lucid__menu_grab_keyboard
$2 = (_Bool *) 0x555555d54ad0 <globals+4208>

This strikes me as more than a little odd.  Given that all I did was
add a couple fprintfs, I'd expect the layout of "globals" to stay the
same.

If I look at globals+4208 in the broken binary, it does have the value
true.

(gdb) print &globals.f_lucid__menu_grab_keyboard
$1 = (_Bool *) 0x555555d54a98 <globals+4152>
(gdb) print 4208-4152
$2 = 56
(gdb) print 0x555555d54a98 + 56
$3 = 93825000622800
(gdb) print /x 56
$4 = 0x38
(gdb) print *(_Bool *) 93825000622800
$5 = true

Not sure what to make of that.  I'm reluctant to conclude that there's a
toolchain problem.  But FWIW, I'm building on Debian 11 (amd64) and "gcc
--version" reports "gcc (Debian 10.2.1-6) 10.2.1 20210110".  emacs-29
branch (git hash a14821d615, plus some changes to MH-E).

mike




This bug report was last modified 2 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.