<?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 for Airs - Ian Lance Taylor</title>
	<atom:link href="http://www.airs.com/blog/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.airs.com/blog</link>
	<description>Ian Lance Taylor</description>
	<lastBuildDate>Mon, 15 Mar 2010 16:54:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Linkers part 7 by Ian Lance Taylor</title>
		<link>http://www.airs.com/blog/archives/44/comment-page-1#comment-18291</link>
		<dc:creator>Ian Lance Taylor</dc:creator>
		<pubDate>Mon, 15 Mar 2010 16:54:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/archives/44#comment-18291</guid>
		<description>Thanks for the comment.  I guess I&#039;m not sure just what you are saying.  It&#039;s true that when an executable uses the default IE model to access a TLS variable defined in a shared library, the dynamic linker has to resolve that access at startup time, rather than lazily.  This doesn&#039;t really affect how the shared libraries access the TLS variable, though; they will continue to use a function call to resolve the address.

Lazy binding is not really a feature of TLS variables.  Lazy binding is used for function calls, not variable references.  TLS variables do support lazy allocation, which is not quite the same thing.  It&#039;s true that if an executable refers to a TLS variable, then that variable can not be allocated lazily.  But that doesn&#039;t really matter, as the allocation of a TLS variable referenced by an executable is essentially free.  It simply becomes part of the executable&#039;s TLS segment.</description>
		<content:encoded><![CDATA[<p>Thanks for the comment.  I guess I&#8217;m not sure just what you are saying.  It&#8217;s true that when an executable uses the default IE model to access a TLS variable defined in a shared library, the dynamic linker has to resolve that access at startup time, rather than lazily.  This doesn&#8217;t really affect how the shared libraries access the TLS variable, though; they will continue to use a function call to resolve the address.</p>
<p>Lazy binding is not really a feature of TLS variables.  Lazy binding is used for function calls, not variable references.  TLS variables do support lazy allocation, which is not quite the same thing.  It&#8217;s true that if an executable refers to a TLS variable, then that variable can not be allocated lazily.  But that doesn&#8217;t really matter, as the allocation of a TLS variable referenced by an executable is essentially free.  It simply becomes part of the executable&#8217;s TLS segment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Linkers part 7 by erichtsai</title>
		<link>http://www.airs.com/blog/archives/44/comment-page-1#comment-18290</link>
		<dc:creator>erichtsai</dc:creator>
		<pubDate>Mon, 15 Mar 2010 10:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/archives/44#comment-18290</guid>
		<description>Great blog!

After went through a couple of TLS related documents, I still have questions.  It seems to me that, by default, an executable will use IE model to access external TLS variable.   With IE model, an executable can access all TLS variables in shared libraries explicitly linked with that executable.  So, I think these shared objects can&#039;t support lazy binding for this executable any more.  In order to support lazy binding, either GD model or dlsym() has to be used.  Am I right?

Thanks!

Eric</description>
		<content:encoded><![CDATA[<p>Great blog!</p>
<p>After went through a couple of TLS related documents, I still have questions.  It seems to me that, by default, an executable will use IE model to access external TLS variable.   With IE model, an executable can access all TLS variables in shared libraries explicitly linked with that executable.  So, I think these shared objects can&#8217;t support lazy binding for this executable any more.  In order to support lazy binding, either GD model or dlsym() has to be used.  Am I right?</p>
<p>Thanks!</p>
<p>Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Relational Databases Considered Harmful by eternaleye</title>
		<link>http://www.airs.com/blog/archives/171/comment-page-1#comment-18289</link>
		<dc:creator>eternaleye</dc:creator>
		<pubDate>Sun, 07 Mar 2010 17:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/archives/171#comment-18289</guid>
		<description>Came across this while reading through your archives after finding your site via your excellent linker internals posts. I think that in this view of &quot;how databases should be&quot; you would rather like the SPARQL/RDF system that is becoming popular for the &quot;semantic {web,desktop,etc.}&quot;. Check out Nepomuk in KDE 4 and the Virtuoso RDF database engine/server that it&#039;s built on these days.</description>
		<content:encoded><![CDATA[<p>Came across this while reading through your archives after finding your site via your excellent linker internals posts. I think that in this view of &#8220;how databases should be&#8221; you would rather like the SPARQL/RDF system that is becoming popular for the &#8220;semantic {web,desktop,etc.}&#8221;. Check out Nepomuk in KDE 4 and the Virtuoso RDF database engine/server that it&#8217;s built on these days.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Signed or Unsigned by ncm</title>
		<link>http://www.airs.com/blog/archives/327/comment-page-1#comment-18288</link>
		<dc:creator>ncm</dc:creator>
		<pubDate>Wed, 03 Mar 2010 21:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/?p=327#comment-18288</guid>
		<description>Of course C++ has no choice but to follow C&#039;s int semantics.  It would be stupid to make an unconstrained language to follow C&#039;s mistakes.

I have occasionally seen code that assumed that signed ints roll over nicely to a negative value when they overflow, e.g. &quot;if (i + 100 &lt; i) ....&quot;.  A good optimizing compiler will omit the comparison because signed overflow is undefined behavior.  A better compiler will emit a warning about omitting the comparison.  When last I checked gcc didn&#039;t.

Off topic, I saw code recently like &#039;if (foo() == &quot;bar&quot;)&#039; which passed tests because most compilers merge (some) manifest string constants.  I would expect a good compiler to warn about this, and treat the expression as always false.</description>
		<content:encoded><![CDATA[<p>Of course C++ has no choice but to follow C&#8217;s int semantics.  It would be stupid to make an unconstrained language to follow C&#8217;s mistakes.</p>
<p>I have occasionally seen code that assumed that signed ints roll over nicely to a negative value when they overflow, e.g. &#8220;if (i + 100 &lt; i) &#8230;.&quot;.  A good optimizing compiler will omit the comparison because signed overflow is undefined behavior.  A better compiler will emit a warning about omitting the comparison.  When last I checked gcc didn&#039;t.</p>
<p>Off topic, I saw code recently like &#039;if (foo() == &quot;bar&quot;)&#039; which passed tests because most compilers merge (some) manifest string constants.  I would expect a good compiler to warn about this, and treat the expression as always false.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Signed or Unsigned by pixelbeat</title>
		<link>http://www.airs.com/blog/archives/327/comment-page-1#comment-18287</link>
		<dc:creator>pixelbeat</dc:creator>
		<pubDate>Wed, 03 Mar 2010 17:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/?p=327#comment-18287</guid>
		<description>Writing a post on signed unsigned comparisons was on my todo list, thanks ! :)

We&#039;ve not enabled -Wsign-compare in coreutils at the moment, due to some ugliness that&#039;s introduced in the code to work around the false positives. But it is a very useful warning to enable as I for one easily miss these. For a concrete example of a portability fix see:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=e2dbcee4</description>
		<content:encoded><![CDATA[<p>Writing a post on signed unsigned comparisons was on my todo list, thanks ! <img src='http://www.airs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>We&#8217;ve not enabled -Wsign-compare in coreutils at the moment, due to some ugliness that&#8217;s introduced in the code to work around the false positives. But it is a very useful warning to enable as I for one easily miss these. For a concrete example of a portability fix see:<br />
<a href="http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=e2dbcee4" rel="nofollow">http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=e2dbcee4</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Superbugs by ncm</title>
		<link>http://www.airs.com/blog/archives/325/comment-page-1#comment-18286</link>
		<dc:creator>ncm</dc:creator>
		<pubDate>Wed, 03 Mar 2010 03:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/?p=325#comment-18286</guid>
		<description>I think I read that the U.S. alone had something like 60,000 cases of superbug infections in hospitals in 2008.  Apparently the overwhelming majority of cases were caused by hospital personnel not following sanitary procedures.  I.e., at a very few hospitals that have experimented with strict use of checklists in intensive care wards, infection rates plummeted by more than an order of magnitude.  It&#039;s easy to believe that improved airflow design (particularly in waiting rooms -- hold on, &quot;waiting rooms&quot;?!) could pick off another order of magnitude.

Administrators of hospitals not using strict checklist procedures should be considered criminally negligent.  That members of the medical profession are not spontaneously adopting these changes wholesale speaks volumes.</description>
		<content:encoded><![CDATA[<p>I think I read that the U.S. alone had something like 60,000 cases of superbug infections in hospitals in 2008.  Apparently the overwhelming majority of cases were caused by hospital personnel not following sanitary procedures.  I.e., at a very few hospitals that have experimented with strict use of checklists in intensive care wards, infection rates plummeted by more than an order of magnitude.  It&#8217;s easy to believe that improved airflow design (particularly in waiting rooms &#8212; hold on, &#8220;waiting rooms&#8221;?!) could pick off another order of magnitude.</p>
<p>Administrators of hospitals not using strict checklist procedures should be considered criminally negligent.  That members of the medical profession are not spontaneously adopting these changes wholesale speaks volumes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Synthetic Food by ncm</title>
		<link>http://www.airs.com/blog/archives/323/comment-page-1#comment-18285</link>
		<dc:creator>ncm</dc:creator>
		<pubDate>Wed, 03 Mar 2010 03:00:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/?p=323#comment-18285</guid>
		<description>An animal has organs because they do something.  Legs and eyes aren&#039;t much use to a cow in a feedlot, but the intestines, liver, pancreas, kidney, and thyroid are certainly busy.  I have never heard of anyone duplicating functions of the liver or thyroid.

Maybe a collection of hypertrophied, er, &quot;lights&quot;, could be kept operational (not to say &quot;healthy&quot;) as muscle is grown and harvested and grown again. You would need clean-room conditions, as in chip fabs. I suppose the feedstock would be hydroponic algae, solar-pumped.  Whatever mix of elements are taken away with the meat would need to be fed back to the algae. It is hard to imagine such an operation running as cheaply than what is done now.
 
Probably more effective (somebody wake up Freeman Dyson) would be to get trees to grow meat fruits.  Maybe start with a jackfruit tree...</description>
		<content:encoded><![CDATA[<p>An animal has organs because they do something.  Legs and eyes aren&#8217;t much use to a cow in a feedlot, but the intestines, liver, pancreas, kidney, and thyroid are certainly busy.  I have never heard of anyone duplicating functions of the liver or thyroid.</p>
<p>Maybe a collection of hypertrophied, er, &#8220;lights&#8221;, could be kept operational (not to say &#8220;healthy&#8221;) as muscle is grown and harvested and grown again. You would need clean-room conditions, as in chip fabs. I suppose the feedstock would be hydroponic algae, solar-pumped.  Whatever mix of elements are taken away with the meat would need to be fed back to the algae. It is hard to imagine such an operation running as cheaply than what is done now.</p>
<p>Probably more effective (somebody wake up Freeman Dyson) would be to get trees to grow meat fruits.  Maybe start with a jackfruit tree&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Thread Sanitizer by kcc</title>
		<link>http://www.airs.com/blog/archives/321/comment-page-1#comment-18281</link>
		<dc:creator>kcc</dc:creator>
		<pubDate>Sat, 13 Feb 2010 17:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/?p=321#comment-18281</guid>
		<description>[Slightly off-topic]
Here is a discussion about cases when two threads write the same value to the same memory. Quite entertaining :) 
http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html</description>
		<content:encoded><![CDATA[<p>[Slightly off-topic]<br />
Here is a discussion about cases when two threads write the same value to the same memory. Quite entertaining <img src='http://www.airs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html" rel="nofollow">http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Thread Sanitizer by Ian Lance Taylor</title>
		<link>http://www.airs.com/blog/archives/321/comment-page-1#comment-18280</link>
		<dc:creator>Ian Lance Taylor</dc:creator>
		<pubDate>Sat, 13 Feb 2010 17:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/?p=321#comment-18280</guid>
		<description>Thanks for the comments.

jyasskin: Channels are neither better nor worse than the threadpool I wrote.  The difference is simply that since channels are built into the language, any concurrency issues only have to be fixed in one place.  Gold had to be highly portable, and there is no standard concurrency library for C++.  Even the libraries planned for C++0x are too low-level to really help people avoid concurrency problems; they just standardize and clarify the operations which programmers already use.  (Of course portability also precludes writing gold in Go, at least at present; I was really just thinking of the advantage of including solid concurrency support in the language.)

kcc: I didn&#039;t mean to impugn the tool, which you&#039;ve done a great job on.  By false positives I meant cases where different threads can initialize a variable simultaneously, but they always initialize the variable to the same value.  This is (as far as I know) safe on popular hosts, though it is technically a race and can fail on some unusual processors.</description>
		<content:encoded><![CDATA[<p>Thanks for the comments.</p>
<p>jyasskin: Channels are neither better nor worse than the threadpool I wrote.  The difference is simply that since channels are built into the language, any concurrency issues only have to be fixed in one place.  Gold had to be highly portable, and there is no standard concurrency library for C++.  Even the libraries planned for C++0x are too low-level to really help people avoid concurrency problems; they just standardize and clarify the operations which programmers already use.  (Of course portability also precludes writing gold in Go, at least at present; I was really just thinking of the advantage of including solid concurrency support in the language.)</p>
<p>kcc: I didn&#8217;t mean to impugn the tool, which you&#8217;ve done a great job on.  By false positives I meant cases where different threads can initialize a variable simultaneously, but they always initialize the variable to the same value.  This is (as far as I know) safe on popular hosts, though it is technically a race and can fail on some unusual processors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Thread Sanitizer by kcc</title>
		<link>http://www.airs.com/blog/archives/321/comment-page-1#comment-18279</link>
		<dc:creator>kcc</dc:creator>
		<pubDate>Sat, 13 Feb 2010 15:06:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.airs.com/blog/?p=321#comment-18279</guid>
		<description>&gt;&gt; This approach can yield false positives to be sure
It can&#039;t. 
There are no false positives unless you use raw atomic instructions for synchronization. 
There is another approach (called &quot;hybrid&quot; because it uses &#039;happens-before&#039; and &#039;lockset&#039;) which can have false positives. More on these two approaches here: http://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid</description>
		<content:encoded><![CDATA[<p>&gt;&gt; This approach can yield false positives to be sure<br />
It can&#8217;t.<br />
There are no false positives unless you use raw atomic instructions for synchronization.<br />
There is another approach (called &#8220;hybrid&#8221; because it uses &#8216;happens-before&#8217; and &#8216;lockset&#8217;) which can have false positives. More on these two approaches here: <a href="http://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid" rel="nofollow">http://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
