]> www.ginac.de Git - ginac.git/commit
Avoid infinite loop when unarchiving realsymbol and possymbol.
authorAlexei Sheplyakov <alexei.sheplyakov@gmail.com>
Mon, 4 Oct 2010 07:21:05 +0000 (09:21 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 4 Oct 2010 07:22:54 +0000 (09:22 +0200)
commitc40c54f17b68f79ee42833adb3364970385e2caa
tree4ffc40e8a8571e05dcea7c3541b551a969fd9a01
parent89d5356b4aa33cb4481575f9453f36c3404b015b
Avoid infinite loop when unarchiving realsymbol and possymbol.

symbol::read_archive(): explicitly set status_flags::evaluated (and
status_flags::expanded) on object being unarchived. These flags get
reset by basic::operator=(const basic&) for realsymbol and possymbol,
and nothing sets (except symbol ctor), so automatic evaluation never
terminates (or rather, terminates due to a stack overflow). Therefore
it's necessary need to set status_flags::evaluated explicitly.

Thanks to Markus Fröb for a bugreport and a test case.
(cherry picked from commit e99d0d58c1bbaa8ee73e4a90a90aa1086f2f813d)
ginac/symbol.cpp