Subject: bug#23856: 25.0.95; Crash on cancel print dialogue

From: Alan Third <[email-masked]>
Date: Tue, 28 Jun 2016 17:57:07 +0100

Alf Lervåg <[email-masked]> writes:

> Occasionally I press cmd-p by mistake. When I press cancel in the
> print dialogue, emacs crashes. This is annoying. Let me know if there
> is anything I can do to help locate the root cause.
>
> 1. Press Cmd-P
> 2. Press Esc

This can be triggered from any dialogue box, it seems. I eval:

(x-popup-dialogue t '("moo"))

and then hit esc. It doesn't crash every time, but it will after
repeating a few times.

It's a seg fault at line 1446 of nsmenu.m:

    [unwind_data->pool release];

This is Objective C's way of freeing memory and I guess that it's
crashing because it's trying to release some memory that's already been
freed. Maybe.

* thread #1: tid = 0x65736, 0x00007fff8dc21af1 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 403, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
    frame #0: 0x00007fff8dc21af1 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 403
libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop:
->  0x7fff8dc21af1 <+403>: movq   0x10(%rbx), %rax
    0x7fff8dc21af5 <+407>: leaq   0x38(%rbx), %rcx
    0x7fff8dc21af9 <+411>: cmpq   %rcx, %rax
    0x7fff8dc21afc <+414>: jne    0x7fff8dc21b1e            ; <+448>

-- 
Alan Third