<!-- 
RSS generated by JIRA (4.4#649-r158309) at Wed Jun 19 09:00:21 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CLJ-1053/CLJ-1053.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-1053] Locals still cleared too aggressively on delay in specific cases</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1053</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This seems to be an extension of &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-232&quot;&gt;#CLJ-232&lt;/a&gt;. Locals are still cleared too aggressively in some specific instances: If the delay throws an exception when realized, and you dereference a local within the delay, the local may or may not be cleared depending on its need in the tail positions (without any obvious pattern). Examples of functions which works as intended and doesn&apos;t work as intended follows.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(def d (let [y (delay 0)]
         (delay (if (zero? @y) (/ 0 0) (/ @y 1))))) ; works properly

(def d (let [y (delay 0)]
         (delay (if (zero? @y) (/ 0 0) (/ 1 1))))) ; does not work properly

(def d (let [y (delay 0)]
         (delay (if (zero? @y) (/ @y 0) (/ 1 1))))) ; does not work properly

(def d (let [y (delay 0)]
         (delay (if (zero? @y) (/ @y 0) (/ @y 1))))) ; does not work properly

(def d (let [y (delay 0)]
         (delay @y (/ 0 0)))) ; does not work properly

(def d (let [y (delay 0)]
         (delay @y (/ 0 0) @y))) ; works properly
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;By &quot;works&quot;, &lt;tt&gt;d&lt;/tt&gt; will throw &quot;ArithmeticException Divide by zero&quot; every single time it is dereferenced. By &quot;does not work&quot;, &lt;tt&gt;d&lt;/tt&gt; will throw &quot;ArithmeticException Divide by zero&quot; on first dereferencing, but from second and onwards it will throw &quot;NullPointerException   &lt;span class=&quot;error&quot;&gt;&amp;#91;trace missing&amp;#93;&lt;/span&gt;&quot;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15657">CLJ-1053</key>
            <summary>Locals still cleared too aggressively on delay in specific cases</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hypirion">Jean Niklas L&apos;orange</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Aug 2012 17:25:56 -0500</created>
                <updated>Tue, 9 Apr 2013 11:55:52 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="30919" author="hypirion" created="Tue, 9 Apr 2013 11:55:52 -0500"  >&lt;p&gt;With Clojure 1.5.1, the trace is given and returns &lt;tt&gt;NullPointerException   clojure.core/deref-future (core.clj:2NullPointerException   clojure.core/deref-future (core.clj:2108)108)&lt;/tt&gt;, which refers to a &lt;a href=&quot;https://github.com/clojure/clojure/blob/clojure-1.5.1/src/clj/clojure/core.clj#L2108&quot;&gt;&lt;tt&gt;.get&lt;/tt&gt; call&lt;/a&gt;. The stacktrace reveals the following:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;NullPointerException 
	clojure.core/deref-future (core.clj:2108)
	clojure.core/deref (core.clj:2129)
	user/fn--1/fn--4 (NO_SOURCE_FILE:2)
	clojure.lang.Delay.deref (Delay.java:33)
	clojure.core/deref (core.clj:2128)
	user/eval13 (NO_SOURCE_FILE:-1)
	clojure.lang.Compiler.eval (Compiler.java:6619)
	clojure.lang.Compiler.eval (Compiler.java:6582)
	clojure.core/eval (core.clj:2852)
	clojure.main/repl/read-eval-print--6588/fn--6591 (main.clj:259)
	clojure.main/repl/read-eval-print--6588 (main.clj:259)
	clojure.main/repl/fn--6597 (main.clj:277)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>