Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PersistentHashMap.iterator bug: null key and value in entries #4

Open
jordanlewis opened this issue Aug 16, 2012 · 3 comments
Open

Comments

@jordanlewis
Copy link
Contributor

Occasionally, PersistentHashMap's entry iterator will return an entry whose key and value are both null.

Running my test case in the debugger, I can see that the map's hasNull value is set to false. Additionally, my code never assocs a null key or value into the map. Running the same test case with PersistentHashMap.iterator2 (the original recursive Seq implementation from Clojure) does not produce entries with null keys or values.

Unfortunately, I don't have a minimal test case at this time. I'm starting this issue as a placeholder, in case you have or someone else has a good idea of what's going wrong.

Thoughts?

@krukow
Copy link
Owner

krukow commented Aug 18, 2012

Ok, thanks for the report. Is it possible for you give me some info on how to reproduce? I thought I had tested the iterator pretty well.

@jordanlewis
Copy link
Contributor Author

I don't have a minimal test case yet.

However, I also discovered that there's another bug, this one actually present in mainline Clojure 1.3. It seems to me that it's more than likely that the bug I discovered is actually a manifestation of the bug in Clojure, that was fixed in http://dev.clojure.org/jira/browse/CLJ-829.

I'm uploading a pull request that merges in the fix for the above.

@PerMildner
Copy link

Has this not been fixed already, with #5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants