all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Florian Ebeling <florian.ebeling@gmail.com>
To: Chong Yidong <cyd@gnu.org>
Cc: 11541@debbugs.gnu.org
Subject: bug#11541: 24.0.97; Crash when visiting file on OS X 10.7.3
Date: Wed, 30 May 2012 16:39:21 +0200	[thread overview]
Message-ID: <CAGOk8R8Ov_1TG3DMR8qGkpGB_qwU+9DYV3BXPYJCRewdGJ+Hrg@mail.gmail.com> (raw)
In-Reply-To: <87d35lyen5.fsf@gnu.org>

On Wed, May 30, 2012 at 3:36 PM, Chong Yidong <cyd@gnu.org> wrote:
> Interesting.  We need to pin down where the stack clobbering is taking
> place; I don't see an obvious problem in the code, so let's just do it
> by brute force.  Could you apply the following patch (which adds three
> abort conditions to the code), trigger the bug again, then see where the
> abort takes place?

It still stops at the same location, which is 531 after the patch.
Here is the debugger session output:

#16 0x00007fff89e8a587 in TDescriptor::CreateMatchingDescriptors ()
#17 0x0000000100a32599 in -[NSCTFontDescriptor
matchingFontDescriptorsWithMandatoryKeys:] ()
#18 0x00000001001a1c70 in ns_findfonts (font_spec=140734799760960,
isMatch=0 '\0') at nsfont.m:531
(More stack frames follow...)
(gdb) f 18
#18 0x00000001001a1c70 in ns_findfonts (font_spec=140734799760960,
isMatch=0 '\000') at nsfont.m:531
531	    matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys];
Current language:  auto; currently objective-c
(gdb) li ns_findfonts
492	/* Implementation for list() and match().  List() can return nil, match()
493	must return something.  Strategy is to drop family name from attribute
494	matching set for match. */
495	static Lisp_Object
496	ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
497	{
498	    Lisp_Object tem, list = Qnil;
499	    NSFontDescriptor *fdesc, *desc;
500	    NSMutableSet *fkeys;
501	    NSArray *matchingDescs;
(gdb)
502	    NSEnumerator *dEnum;
503	    NSString *family;
504	    NSSet *cFamilies;
505	    BOOL foundItal = NO;
506	
507	    if (NSFONT_TRACE)
508	      {
509		fprintf (stderr, "nsfont: %s for fontspec:\n    ",
510			 (isMatch ? "match" : "list"));
511		debug_print (font_spec);
(gdb)
512	      }
513	
514	    if (!FONT_SPEC_P (font_spec))
515	      abort ();
516	
517	    cFamilies = ns_get_covering_families (ns_get_req_script
(font_spec), 0.90);
518	
519	    if (!FONT_SPEC_P (font_spec))
520	      abort ();
521	
(gdb)
522	    fdesc = ns_spec_to_descriptor (font_spec);
523	
524	    if (!FONT_SPEC_P (font_spec))
525	      abort ();
526	
527	    fkeys = [NSMutableSet setWithArray: [[fdesc fontAttributes] allKeys]];
528	    if (isMatch)
529		[fkeys removeObject: NSFontFamilyAttribute];
530	
531	    matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys];
(gdb) p font_spec
$1 = 140734799760960
(gdb) xtype
Lisp_Int0





  reply	other threads:[~2012-05-30 14:39 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 10:29 bug#11541: 24.0.97; Crash when visiting file on OS X 10.7.3 Florian Ebeling
2012-05-24 22:08 ` bug#11541: Florian Ebeling
2012-05-26  8:33 ` bug#11541: 24.0.97; Crash when visiting file on OS X 10.7.3 Jan Djärv
2012-05-26 20:12   ` Florian Ebeling
2012-05-29 14:06 ` Chong Yidong
2012-05-29 19:48   ` Florian Ebeling
2012-05-30  3:22     ` Chong Yidong
2012-05-30  7:55       ` Florian Ebeling
2012-05-30 10:31         ` Chong Yidong
2012-05-30 10:53           ` C. Florian Ebeling
2012-05-30 13:36             ` Chong Yidong
2012-05-30 14:39               ` Florian Ebeling [this message]
2012-05-31  6:52                 ` Chong Yidong
2012-05-31  7:12                   ` Florian Ebeling
2012-05-31  9:31                     ` Chong Yidong
2012-05-31 10:19                       ` Florian Ebeling
2012-05-31 15:48                       ` Eli Zaretskii
2012-05-31 17:27                         ` C. Florian Ebeling
2012-05-31 17:54                           ` Eli Zaretskii
2012-05-31 19:15                             ` Alp Aker
2012-05-31 19:48                               ` Eli Zaretskii
2012-05-31 19:50                             ` C. Florian Ebeling
2012-05-31 20:11                               ` Eli Zaretskii
2012-05-31 21:55                                 ` Florian Ebeling
2012-06-01  3:50                                   ` YAMAMOTO Mitsuharu
2012-06-01  5:43                                     ` Florian Ebeling
2012-06-01  6:14                                       ` Eli Zaretskii
2012-06-01  6:36                                         ` Florian Ebeling
2012-06-01  6:41                                           ` Chong Yidong
2012-06-01  6:44                                             ` Florian Ebeling
2012-06-01  8:53                                               ` Eli Zaretskii
2012-06-01 11:57                                               ` Jan D.
2012-06-01 13:42                                                 ` Chong Yidong
2012-06-01  6:17                                       ` Eli Zaretskii
2012-06-01  6:46                                         ` Florian Ebeling
2012-06-01  8:47                                           ` Eli Zaretskii
2012-06-01  8:55                                             ` Florian Ebeling
2012-06-01  9:21                                               ` Eli Zaretskii
2012-06-01 14:51                                                 ` Florian Ebeling
2012-06-01 16:12                                                   ` Jan Djärv
     [not found]                                                 ` <mailman.2085.1338562350.855.bug-gnu-emacs@gnu.org>
2012-06-18 23:06                                                   ` jamezilla
2012-06-20 19:56                                                     ` Florian Ebeling
     [not found]                                                     ` <mailman.3138.1340222261.855.bug-gnu-emacs@gnu.org>
2012-06-22  5:29                                                       ` jamezilla
2012-06-01  8:52                                           ` Florian Ebeling
2012-06-01  8:56                                             ` Eli Zaretskii
2012-09-26 20:30 ` bug#11541: - Another reproduction - Emacs 24.2; Null pointer on OSX with cocoa UI mrevilgnome
2012-09-26 20:41   ` mrevilgnome
2012-10-14 18:58 ` bug#11541: 24.0.97; Crash when visiting file on OS X 10.7.3 Jan Djärv
2012-10-15 21:15   ` C. Florian Ebeling
2012-10-16  5:05     ` Jan Djärv
2012-11-01  9:49 ` Thomas Kappler
2012-11-06 11:01 ` bug#11541: Possible fix Thomas Kappler
2012-11-08 19:53   ` Jan Djärv
2012-11-09 10:27 ` bug#11541: THanks! Thomas Kappler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGOk8R8Ov_1TG3DMR8qGkpGB_qwU+9DYV3BXPYJCRewdGJ+Hrg@mail.gmail.com \
    --to=florian.ebeling@gmail.com \
    --cc=11541@debbugs.gnu.org \
    --cc=cyd@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.