I'm also having trouble with some cpp files.

I've got one file (572 lines, 18560 bytes), that always causes emacs 24 to hang. Emacs 23.3.1 handles this file just fine.

I am using emacs from git:

commit 6ba3ea4d2625fac8b5fb839f11eeb074d699687e
Author: Christopher Schmidt <christopher@ch.ristopher.com>
Date:   Mon Mar 12 01:31:44 2012 +0800

    * ibuffer.el (ibuffer-redisplay): Remove gratuitous error.

 

When GDB was hanging I stopped the process with GDB, with this backtrace:

http://pastebin.com/ssB96ue4

I'm not familiar with the emacs source code, but I do not know this is normal.

If I can help investigation the problem more in detail, let me know.

Unfortunately I am not allowed to share the source file with you.

 

Also I've tried to decrease font-lock-maximum-decoration to 1, but this didn't have effect.