<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Fixing an Adium bug: A timeline</title>
	<atom:link href="http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/feed" rel="self" type="application/rss+xml" />
	<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline</link>
	<description>The personal weblog of Peter Hosey.</description>
	<lastBuildDate>Sun, 14 Mar 2010 12:45:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-119431</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Wed, 05 Sep 2007 05:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-119431</guid>
		<description>Already commented on it with my thanks. ☺</description>
		<content:encoded><![CDATA[<p>Already commented on it with my thanks. ☺</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blake C.</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-119414</link>
		<dc:creator>Blake C.</dc:creator>
		<pubDate>Wed, 05 Sep 2007 04:15:04 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-119414</guid>
		<description>Just posted it:

http://yamacdev.blogspot.com/2007/09/case-of-missing-stack-frames.html</description>
		<content:encoded><![CDATA[<p>Just posted it:</p>
<p><a href="http://yamacdev.blogspot.com/2007/09/case-of-missing-stack-frames.html" rel="nofollow">http://yamacdev.blogspot.com/2007/09/case-of-missing-stack-frames.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blake C.</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-117631</link>
		<dc:creator>Blake C.</dc:creator>
		<pubDate>Thu, 30 Aug 2007 05:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-117631</guid>
		<description>Well, I was wrong again. -fomit-frame-pointer does not result in a missing stack frame in a backtrace, at least on Intel. I&#039;m looking into it further, blog post coming soon.</description>
		<content:encoded><![CDATA[<p>Well, I was wrong again. -fomit-frame-pointer does not result in a missing stack frame in a backtrace, at least on Intel. I'm looking into it further, blog post coming soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blake C.</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-114219</link>
		<dc:creator>Blake C.</dc:creator>
		<pubDate>Fri, 17 Aug 2007 20:59:24 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-114219</guid>
		<description>After some more homework, it appears I didn&#039;t have all the facts exactly correct- while the tail call optimization does result in a frame being omitted from a backtrace, it&#039;s not because the frame was not established. It&#039;s just that the frame is not visible because of the nature of what seems to be referred to as a &#039;sibling&#039; call.

Regarding -fno-omit-frame-pointer: A stack frame can be omitted from a backtrace for 2 reasons that I know of- a tail call can render the frame invisible, or the frame can actually be omitted from the object code as a different optimization. -fno-omit-frame-pointer will prevent the latter case from happening, but will have no effect on the former.

Regarding -fno-optimize-sibling-calls: I&#039;ve not come across this one before, and &#039;man gcc&#039; is no help. It looks like this is an area I should research more and maybe blog about...</description>
		<content:encoded><![CDATA[<p>After some more homework, it appears I didn't have all the facts exactly correct- while the tail call optimization does result in a frame being omitted from a backtrace, it's not because the frame was not established. It's just that the frame is not visible because of the nature of what seems to be referred to as a 'sibling' call.</p>
<p>Regarding -fno-omit-frame-pointer: A stack frame can be omitted from a backtrace for 2 reasons that I know of- a tail call can render the frame invisible, or the frame can actually be omitted from the object code as a different optimization. -fno-omit-frame-pointer will prevent the latter case from happening, but will have no effect on the former.</p>
<p>Regarding -fno-optimize-sibling-calls: I've not come across this one before, and 'man gcc' is no help. It looks like this is an area I should research more and maybe blog about...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-114119</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Fri, 17 Aug 2007 04:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-114119</guid>
		<description>Blake C.: Aha. Interesting.

Would -fno-optimize-sibling-calls or perhaps -fno-omit-frame-pointer (added to the Deployment-Debug build config) end that problem?

If so, I&#039;ll add it to my list of bugs to file that that option/those options should be included in the Debug config in the project template.</description>
		<content:encoded><![CDATA[<p>Blake C.: Aha. Interesting.</p>
<p>Would -fno-optimize-sibling-calls or perhaps -fno-omit-frame-pointer (added to the Deployment-Debug build config) end that problem?</p>
<p>If so, I'll add it to my list of bugs to file that that option/those options should be included in the Debug config in the project template.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blake C.</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-114084</link>
		<dc:creator>Blake C.</dc:creator>
		<pubDate>Thu, 16 Aug 2007 22:22:51 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-114084</guid>
		<description>Oops, I should clarify- not pushing %eip/%rip is a side effect of using some variant of &#039;jmp&#039; rather than &#039;call&#039;. This is very easy to spot in otool or otx output.</description>
		<content:encoded><![CDATA[<p>Oops, I should clarify- not pushing %eip/%rip is a side effect of using some variant of 'jmp' rather than 'call'. This is very easy to spot in otool or otx output.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blake C.</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-114083</link>
		<dc:creator>Blake C.</dc:creator>
		<pubDate>Thu, 16 Aug 2007 22:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-114083</guid>
		<description>Excellent post!

&quot;This also means that zac&#039;s backtrace in #7543 is the same bug; the one in #7542 is missing a frame (for some reason).&quot;

This is most likely caused by a tail call optimization, wherein a function A can call another function B without updating the return address, for example &#039;b&#039; instead of &#039;blr&#039; on ppc and simply not pushing %eip/%rip in i386/x86_64. While the performance win is nice, it does have the side effect of not establishing a new stack frame for function B. If you find that this is indeed the cause of the missing stack frame, there&#039;s a handy way to force gcc to not generate the tail call- just add the following line as the last line in function A:

__asm__ volatile(&quot;&quot;);

Sprinkle that where needed and stack frames will abound :)</description>
		<content:encoded><![CDATA[<p>Excellent post!</p>
<p>"This also means that zac's backtrace in #7543 is the same bug; the one in #7542 is missing a frame (for some reason)."</p>
<p>This is most likely caused by a tail call optimization, wherein a function A can call another function B without updating the return address, for example 'b' instead of 'blr' on ppc and simply not pushing %eip/%rip in i386/x86_64. While the performance win is nice, it does have the side effect of not establishing a new stack frame for function B. If you find that this is indeed the cause of the missing stack frame, there's a handy way to force gcc to not generate the tail call- just add the following line as the last line in function A:</p>
<p>__asm__ volatile("");</p>
<p>Sprinkle that where needed and stack frames will abound :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Davies</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-113850</link>
		<dc:creator>Michael Davies</dc:creator>
		<pubDate>Wed, 15 Aug 2007 12:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-113850</guid>
		<description>This is a great post, and should be required reading for all budding application developers! Thanks for taking the time to record it all. 

It&#039;s also really good to see the amount of support you could call on from the user community. 

Cheers, Michael</description>
		<content:encoded><![CDATA[<p>This is a great post, and should be required reading for all budding application developers! Thanks for taking the time to record it all. </p>
<p>It's also really good to see the amount of support you could call on from the user community. </p>
<p>Cheers, Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Dempsey</title>
		<link>http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline/comment-page-1#comment-113794</link>
		<dc:creator>Adam Dempsey</dc:creator>
		<pubDate>Wed, 15 Aug 2007 10:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/archives/2007-08-14/fixing-an-adium-bug-a-timeline#comment-113794</guid>
		<description>very interesting read :)  Thanks for sharing the story and thanks to all involved for the quick fix :)</description>
		<content:encoded><![CDATA[<p>very interesting read :)  Thanks for sharing the story and thanks to all involved for the quick fix :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.026 seconds -->
