The one moved are supported since a long time/older compiler versions
and from both Clang and GCC, so they can be safely moved.
Also, not having to check them, CMake configuration is a bit faster.
from some IDEs or other apps). Set debug build optimization flags again to minimal (Og)
Using O1 sometimes combined statements and inlined variables, making
line-by-line debugging harder.
Updated Windows-GNU toolchain warning flags.
Fixed some function calls getting as argument a null pointer instead of
a string, and similar issues found with a new warning flag.
Also minimal refactoring to CSQLite, encapsulated zlib includes in a
zlib namespace.
Removed legacy/unused SLAYER* properties.
Added log message when a new thread is created or a thread is being renamed.
Added more methods for enum conversion in stypecast.h.
Made more resilient to rare mutex locking errors the threads-managing code.
Made more threads.h methods noexcept.
Reordered CChar members to reduce memory usage.
Added ensure_comptime() in common.h.
Fixed Windows compilation error.
- Fixed: custom triggers not firing.
- Fixed: CUOClientVersion not parsing correctly new string format.
- Fixed: TOOLTIP Dialog keyword sending the cliloc number in hex notation if ini DecimalVariables == 0 (unsupported by client, making some of them crash).
- Fixed: some integer data type size inconsistencies.
- Fixed: initialization order fiasco for CAccounts at server shutdown.
- Changed: Str_To* functions to return a std::optional value, in order to get the best error handling (before, it depended on errno and there were ambiguous return values for invalid or "0" zero strings.
- Changed: Refactored CUOMobTypes.
- Changed: replaced localtime function with thread-safe alternatives, avoiding data race conditions.
- Added: stypecast.h. It has utilities to cast numbers with strong guarantees and error checking at compile time, to avoid undefined behaviors, involuntary wrong sign/size cast or overflowing.
- Fixed: ini CommandPrefix being overwritten by data from other ini settings.
- Fixed: function call stack sometimes being subject to a race condition between two writing threads, corrupting it.
- Fixed: lots of memory corruption errors leaving the server unstable when loading a broken save file and recovering by loading a backup save.
- Fixed: CCacheableScriptFile sometimes not reading the last character.
- Fixed: .clang_format.
- Changed: RES_GET_INDEX macro to ResGetIndex function, allowing more integer type safety. Same for RES_GET_TYPE.
- Changed: Renamed THREAD_* macros to MT_*. Split them in always active macros (MT_*) and macros active only when MT_ENGINE is set to 1 (MT_ENGINE_*). There are some situations where we still need a mutex
even if not working with multithreaded script/networking engines (which are NOT complete).
- Changed: Disable signal handlers under Linux if running with ASAN or a debugger.
- Added: NOEXCEPT_DEBUG, it's simply the noexcept specifier, but it's ignored if running in a debug build (useful if we're using DEBUG_ASSERT inside a function which wouldn't otherwise throw an exception).
- Fixed: some undefined behaviors, like signed to unsigned conversion and vice versa.
- Added: additional checks for GCC and Clang ASAN builds.
- Fixed: RAM usage always increasing during uptime. Caused by a couple of memory leaks, the greatest happening because the cached map blocks were not properly released.
- Fixed: adopted a more conservative memory allocation policy for strings, resulting in reduced RAM usage.
- Changed: I_MEMORY (ITEMID_MEMORY) items won't have anymore the ComponentProps Faction, ItemChar, Item, reducing their memory footprint.
Fixed some Linux compilation warnings and errors.
MSVC will compile by default with SSE2 CPU extensions enabled on x86_64. Updated CMakeDetectArch.cmake with 3rd party code.
Added #define MT_ENGINES: it doesn't make sense to keep unneeded mutex locks, at least until (if ever) we'll have a fully multithreaded engine.
Some advancement in making ASAN work on Windows with Clang.
Added .cmake-format
This can be useful when using raw IDs (like 01, 0bd1, etc) instead of defnames.
- Improvement: changed the logic behind script files reading and caching, now it will be faster and require less memory.
- Fixed: correct thread name not being shown in the stack trace.
- Renamed ResourceGetID_Advance to ResourceGetID_EatStr, added fCanFail argument.
- Added some string functions, starting from POSIX C getline and getdelim (got the source from NetBSD and renamed to fReadUntilDelimiter), then added some more custom functions to help read from file or string buffers.
Added: CMake switch to statically link C/C++ runtime libraries (on
Linux, glibc still isn't included); fixed linker flags when using
sanitizers.
Added: asan symbolizer setting in configure_asan.sh, to be able to see
the function names.
Further optimized CWorldSearch::Get* methods and CItem/CChar::GetHeight.
Added checks to avoid buffer overflows using sprintf (and removed the
compiler warnings).
Fixed some invalid memory reads when the server is closing (reading from
deleted thread data).
Fixed twofish compilation error on Windows. That library wasn't really meant to be used as-is...
Made _GITVERSION define macro available only when enabling git versioning from CMake.
Modernized and fixed MSVC CMake toolchain.
Removed mariadb_version.h from git index.
Windows and OS X not yet tested.
Moved toolchains .inc files to include/ folder.
Renamed folder lib/bin into _bin.
Moved bcrypt and twofish library into lib folder and into new cmake projects. Restored twofish library to the original version.
Fixed some format warnings.
This will allow setting per-project (build) settings and to build/link
Sphere using system-provided library source/headers/precompiled lib
(like the ones provided with -devel packages on Linux) instead of the
ones shipped with the projects.
This is also a necessary step to use git submodules.
Updated CMake toolchains: improved library search (link phase).
Updated gitignore to add KDevelop files.
Fixed unused parameters, now using them as fault check.
Added include guards to some headers.
Immediately after server start, the global objects are initialized in spheresvr.cpp. This happens before calling main().
Global objects initialization sometimes requires the allocation of temporary strings and the retrieval of the current thread state data (ThreadHolder class stuff).
Both of those things aren't yet created, so we can write to invalid memory instead of using the expected buffer.
When thread state data is not available, so we can't get a temporary string buffer in a thread-safe way, now it will be used the string buffer allocated for thread-unsafe access (for a minimum example, check Str_GetTemp code).
Also, when the server closes, also the temporary string pool and the thread state data are deleted, but there might be some code still requiring thread state data.
So it was added some code accounting of this special application state, avoiding reading or writing to the thread state data location, which doesn't hold anymore valid data.
Immediately after server start, the global objects are initialized in spheresvr.cpp. This happens before calling main().
Global objects initialization sometimes requires the allocation of temporary strings and the retrieval of the current thread state data (ThreadHolder class stuff).
Both of those things aren't yet created, so we can write to invalid memory instead of using the expected buffer.
When thread state data is not available, so we can't get a temporary string buffer in a thread-safe way, now it will be used the string buffer allocated for thread-unsafe access (for a minimum example, check Str_GetTemp code).
Also, when the server closes, also the temporary string pool and the thread state data are deleted, but there might be some code still requiring thread state data.
So it was added some code accounting of this special application state, avoiding reading or writing to the thread state data location, which doesn't hold anymore valid data.
- Fixed: Guildstone removal caused an exception (Issue #1165).
- Fixed: In-game chat not working correctly and generating exceptions since last update (Issue #1140).