-
Notifications
You must be signed in to change notification settings - Fork 56
Merge master in static-analysis #1389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nd Coverity build
… creatures animations #1266
…ntext data in server logs. - 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.
…agSphere function and CUOInstall methods.
…ad of signed char) and initialization order fiasco for g_Srv
…rties: Changed: since there was too much data to be stored in the FACTION/SLAYER property, so that it sometimes couldn't fit and caused issues, it has been split in two different propertie - FACTION/SLAYER_GROUP (expects a bitmask, max value of the usable flag: 0x800000), - FACTION/SLAYER_SPECIES (plain number, max value 255). SPECIES with index/value 1 are always considered to be SuperSlayers for their group. Added some security checks and constexpr.
…ebug builds. Fixed: gump tooltips not showing. Also, small refactoring of dialog parsing code. Fixed: CUOMobtypes not parsing correctly strings with comments, bug introduced with a recent refactor commit. Fixed: CGlobalChatChanMember name could be corrupted/overwritten since it was using a temporary string instead of a properly owned one. Fixed: undefined behavior warning in CScriptObj.cpp. Added more stypecast functions and a couple of fixes there. Added more noexcept specifiers.
Added: RETRY_LOCK_FOR_TASK*, used to retry mutex lock in the (rare) case it fails. This has to be used only for critical mutexes. Added: STDERR_LOG to log critical messages to stderr if standard CLog methods are failing or can't be used. Added: NOTHROW macro to specify functions that might throw an exception, as opposite to nothrow. Adapted some CLog and threading methods to actually be noexcept. Reordered common.h.
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.
…ASSERTs in stypecast.h.
…e base def. Splitted num_alias_cast into n_alias_cast and enum_alias_cast.
…es also for commented lines.
CMake parsing error causing optimizations not being applied correctly to Nightly and Release build.
Update with dev branch bugfixes.
Using vfork() directly is extremely fragile, and posix_spawn() is easier to use. This implements a TODO comment.
Each "apt install" invocation loads the package database, and merging two calls speeds up the build.
"apt" is a wrapper for "apt-get" that is "better suited for interactive usage", but really only adds overhead, and GitHub actions are non-interactive by design.
Let's make this a single command, removing the overhead for two "cd" commands (the latter of which had no effect anyway because it was the last command in the shell process).
It's only used on non-Windows OSes, and declaring it on all but glibc broke the Windows build. Fixes regression by commit 2a129d5
The CI log should be verbose so we can see what commands are really
being used, and it's pointless to use the default "beautified" ninja
output. In this case, I'd like to know why my ccache changes were not
used ("Hits: 0 / Uncacheable: 210"), see commit b06a46e
ccache cannot cache projects using PCH properly unless we allow it to be "sloppy" about it. See ccache manual.
Another improvement for ccache with GCC+PCH, see ccache maual.
to CUSTOM_CXX_FLAGS and CUSTOM_EXE_LINKER_FLAGS. Added -Wdouble-promotion.
This hides all symbols that have no explicit "visibility" attribute. Since Sphere never needs to export any of its symbols to another ELF object (e.g. a loadable module), it makes no sense to leave them in the executable as global symbols. This will make a big difference once we use `--gc-sections`, because only sections with hidden symbols can be dropped from the executable.
This linker flag, if supported, removes unused sections from the
executable. Unused sections are those that do not contain public
symbols (therefore `-fvisibility=hidden`) and are not referenced by
other sections.
This shrinks the code size by 4%:
text data bss dec hex filename
4069421 285904 1427713 5783038 583dfe Debug/bin-native64/SphereSvrX64_release
3918858 284456 1427713 5631027 55ec33 Debug/bin-native64/SphereSvrX64_release
.github/workflows/build*: pass "-v" to ninja
…l Variables to @UserExtCmd Trigger Credits to @canerksk
…ing Animate Dead spell.
Fixed: If Giant Spiders and Fire Elementals are denied going into sleeping state into a sleeping sector, their dropped items (ie. i_spider_web) went into sleeping state and didn't decay, leading to accumulation (Issue #1249). Also, stamina wasn't consumed, thus NPCs had no limit in placing those items.
…g in a sleeping sector.
…if just placed in a sector exceeding complexity threshold.
…the random device. Moved xorshift inclusion in the cpp. Added the mt19937_64 variant for the generation of pseudo-random 64 bits numbers on a 64-bits machine (should be faster). Made xorshift and mt generators multithreaded.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.