Subject: Re: bug#45552: 28.0.50; bootstrap-emacs apparently not correctly codesigned

From: Philipp <[email-masked]>
Date: Sat, 4 Sep 2021 18:55:21 +0200

> Am 31.08.2021 um 21:28 schrieb Alan Third <[email-masked]>:
> 
> Philipp <[email-masked]> writes:
> 
>> The following happens for me (on macOS Big Sur on ARM 64, which needs
>> codesigning) pretty frequently: every time Emacs needs to re-dump as
>> part of `make', the code signature for bootstrap-emacs is somehow
>> invalid.  For example:
>> 
>> $ ./config.status
>> [...]
>> $ gmake
>> [...]
>> /bin/sh: line 3: 18759 Killed: 9               EMACSLOADPATH= '../src/bootstrap-emacs' -batch --no-site-file --no-site-lisp -l autoload --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"calendar/diary-loaddefs.el\")))" -f batch-update-autoloads ./calendar
>> [...]
>> $ src/bootstrap-emacs 
>> Killed: 9
>> 
>> The crash reports for these crashes say
>> 
>> Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
>> Exception Codes:       0x0000000000000032, 0x0000000104098000
>> Exception Note:        EXC_CORPSE_NOTIFY
>> 
>> Termination Reason:    Namespace CODESIGNING, Code 0x2
>> 
>> However, `codesign' thinks the signature is valid:
>> 
>> $ codesign -v -v src/bootstrap-emacs
>> src/bootstrap-emacs: valid on disk
>> src/bootstrap-emacs: satisfies its Designated Requirement
>> 
>> Removing src/bootstrap-emacs and running `gmake' again fixes the issue
>> (until the next re-dump).
> 
> I think we fixed some problems around code signing recently. Is this
> still an issue?

Right now `gmake' appears to work, but I've only tried it once so far, so I'm far from certain.