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
pynac -- segfault probably caused by cmp somehow and using intervals #6163
Comments
comment:1
Shorter snippet:
This doesn't have a problem:
This is caused by the fact that theta1 and theta2 have the same hash (as all symbolic variables which have the same 4 characters in their name), and trying to put them as keys in a dictionary calls
|
comment:2
This is easily fixed by reverting symbol::calchash to the original code in pynac. Since we use the symbol name for comparison in symbol::compare_same_type, this change doesn't effect the printing order. However, it makes the hash values random. I can't see anything wrong with having random hash values. Are there any objections to this? |
comment:3
Burcin, that sounds good to me. |
comment:4
We should probably special-case single-variable expression hashing and equality given how often they're used (e.g. in dictionaries) and how infrequently they're equal. |
Attachment: trac_6163-symbol_hash.patch.gz |
comment:5
New pynac package here reverts to the original http://sage.math.washington.edu/home/burcin/pynac/pynac-0.1.8.spkg Attached patch makes the necessary doctest changes. The new package also contains a fix for #6144, so these tickets should be merged together. |
comment:7
The changes look good to me and all doctests pass. Merged in 4.0.1.rc2. |
Reviewer: Mike Hansen |
Merged: rc2 |
Author: Burcin Erocal |
Changed merged from rc2 to 4.0.1.rc2 |
This segfaults Sage-4.0:
CC: @sagetrac-cwitty @mwhansen @robertwb
Component: calculus
Author: Burcin Erocal
Reviewer: Mike Hansen
Merged: 4.0.1.rc2
Issue created by migration from https://trac.sagemath.org/ticket/6163
The text was updated successfully, but these errors were encountered: