segmentation fault on GiNaC-1.2.0 using MinGW on Win XP
程伯群
cbq at software.ict.ac.cn
Mon Apr 5 12:18:28 CEST 2004
Hello,Johannes Brunen!
I can't say anything about your trouble.
But I have a trouble about ginac-1.1.7.
I had tyied to insatll ginac1.1.7 using MinGW(but no MSYS) on windows XP, but I failed.
You said you had build ginac1.1.7 successfully on the windows XP,
Would you tell me how did you do it?
I read this mail:http://www.ginac.de/lists/ginac-list/msg00410.html
Did you meet this trouble ever?
Thank you very much!
sincerely,
Boqun Cheng
======= 2004-04-05 11:34:00 You say:======
>Hi,
>
>I'm not subscribed to this list, but I have detected a problem with the new release of GiNaC, which I would like to report.
>
>After properly building GiNaC-1.2.0 on windows XP using the MinGW / MSYS platform I got a segmentation fault on
>starting my demo application. This didn't happen with GiNaC-1.1.7.
>
>After looking to the source code I found a problem with the current implementation:
>
>In file uitils.cpp the following constants are defined:
>_num0_p
>_num0
>_ex0
>
>These are initialized on behalf of constructor library_init() which is called by statement
>static library_init library_initialize from file ex.h (line 53).
>
>The constructor function_options::function_options(std::string const & n, std::string const & tn)
>in file function.cpp (line 56) calls function initialize() (line 67 )which has a statement
>symtree = 0; in its implementation (line 82).
>
>Symtree is of type ex which is initialized by ex(int) which calls
>basic & ex::construct_from_int(int i) in file ex.cpp (line 329).
>The relevant line is case 0: return const_cast<numeric &>(_num0);
>
>Reference counting, now, forces usage of operator-> on the _num0 object.
>Now, here is the problem: It may happen that the construtor of function_options() is called before
>the call of library_init().
>function_options() is called during registration of class container by statement
>GINAC_DECLARE_REGISTERED_CLASS(container, basic) in file container.h (line 130).
>
>The construction order of static objects in different translation units is undefined in C++. Therefore
>the problem may or may not show up.
>
>With kind regards and a lot of respect
>
>Johannes
====
cbq at software.ict.ac.cn
2004-04-05
More information about the GiNaC-devel
mailing list