Am Freitag, 08.08.03 um 17:35 Uhr schrieb Martin Costabel:


[...]
I am not buying this explanation completely, because on Darwin, this bus error happens *every time*, and on Linux, *never*. So it doesn't look like a problem involving randomly filled memory locations.

Oh it's not a surprise. While the order in which static constructors are executed is not defined by the C++ standard, and may be completely random, on most target systems the order in which they are called is (semi-)deterministic. The reason why it never works on OS X and always on Linux could be something as trivial as that the one follow the rules "execute them alphabetically" and the other "execute them in reverse alphabetical order". Well the real rules will be different, involve the place where the constructors are defined etc., but you get the idea.



In any case, Scribus is using static objects to read in some character translation tables from some small text files before the main program starts up. For this, it uses qt file operations, which according to the above explanations should be a no-no in this situation. But "it works on Linux" (TM), so the scribus guys have no reason to change it.

Well but it still is a bug in Scribus. They may not care if they work on non-Linux systems, but that doesn't change the fact that it:s a bug :-) They are apparently relying on behavior which the C++ standard explicitly calls undefined. The order in which static constructors are executed is arbitrary, and may even legally change each time you run a program. It may work for them now, but it's a very bad idea, not only for portability now, but also for future compatibility. If one day the Linux folks replace their dynamic linker with a new one, which changes the order it executes static constructors, then Scribus will go broke on Linux, too.


It's bad design. They may not care, but it's a bug.


Cheers,


Max



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to