GNOME Bugzilla – Bug 317364
crashes repeatedly on overlong window title
Last modified: 2005-10-03 18:33:21 UTC
Steps to repro: 0) Compile & run the attached testcase Result: Watch metacity crash repeatedly until it doesn't respawn anymore. I filed bug 317362 for gtk to prevent this from happening through gtk_window_set_title but metacity should be prepared to get this from non-gtk programs.
Created attachment 52739 [details] testcase
That _sucks_. I had to increase the size of the title in the testcase to get anything bad to happen, but once I did, I wasn't even able to get things going again from a virtual terminal without killing gnome-session. I thought I was going to be able to just kill the bad program and restart metacity from virtual terminal 1 like I normally do when I wedge Metacity with a bad patch, but although I got metacity running again it just flat would not respond to any keyboard or mouse input. Marking as urgent since 2.12.1 is coming up real soon now...
Is this a buffer overflow? Pango b0rking? What's going wrong here, exactly?
From a backtrace, it looks like the pango calls to cairo are b0rking -- drawing out of bounds or something? I dunno, but here's the bt: Program received signal SIGABRT, Aborted.
+ Trace 63236
Thread NaN (LWP 22906)
While the pango/cairo crash deserves a fix too, shouldn't metacity simply limit the length to something sane, like maybe 4k or 8k bytes (nearest utf-8 character boundary, of course)?
yea you're probably right Elijah; I'll bet that cairo is aborting on some sort of overflow when we try to draw 20,000 leagues off the screen. Isn't there a convenient GTK label now that ellipsizes stuff for us automatically these days?
Seems to be a duplicate of #315070 which has a patch. That could be nice if you could reply to the comment of the firefox/ubuntu maintainer on the other bug :)
Since bug 315070 is about doing the sane metacity limit as mentioned by Christian in comment 5, I'm reassigning this bug with the pango/cairo backtrace to pango though Owen might tell us we need to refile this upstream...
Yeah, I think it should go upstream to cairo.
Okay, filed as https://bugs.freedesktop.org/show_bug.cgi?id=4657 then.
(A patch in bug 315070 to work around this bug for Metacity has now been committed, for those interested)