#5340: [with patch, needs review] NTL "context"s can be restored at the wrong
time, leading to randomly-wrong answers
---------------------------+------------------------------------------------
 Reporter:  cwitty         |       Owner:  cwitty  
     Type:  defect         |      Status:  assigned
 Priority:  blocker        |   Milestone:  sage-3.4
Component:  number theory  |    Keywords:          
---------------------------+------------------------------------------------

Comment(by cwitty):

 The problem is that {{{__dealloc__}}} can happen at "random" times
 (whenever the garbage collector happens to trigger), so it must not have
 global side-effects.

 To the reviewer: Note that the NTL documentation explicitly says you don't
 need to have the correct context when you destroy an object:
 {{{
 Note, however, that if a GF2E object is created under one modulus
 and then used in any way (except destroyed) under another,
 program behavior is not predictable.
 }}}
 Essentially identical language occurs in the documentation for lzz_pE,
 lzz_p, ZZ_pE, and ZZ_p.

 I fixed 9 potential instances of the problem, but only added a doctest for
 one of them; you'll understand why when you see how hard it is to doctest.

 All doctests pass.

 This is based on sage-3.3 + ReST patches, but I think it would probably
 apply without the ReST patches just fine.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5340#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to