Commit Graph

663 Commits

Author SHA1 Message Date
jackpoz
e96aa444b0 Core/Threading: Fix race condition in Thread
Increment the reference count of m_task in Thread::start() before spawning the actual Thread that will execute the task, otherwise the thread might finish, decRef the task and delete it.

Valgrind log of the issue:
 Invalid read of size 8
   at 0x1314CAD: ACE_Atomic_Op_GCC<long>::operator++() (Atomic_Op_GCC_T.inl:34)
   by 0x15933FB: ACE_Based::Runnable::incReference() (Threading.h:36)
   by 0x1592D2D: ACE_Based::Thread::start() (Threading.cpp:136)
   by 0x1592C37: ACE_Based::Thread::Thread(ACE_Based::Runnable*) (Threading.cpp:111)
   by 0xF6C463: Master::Run() (Master.cpp:195)
   by 0xF725D0: main (Main.cpp:142)
 Address 0x26137278 is 8 bytes inside a block of size 24 free'd
   at 0x4C2B59C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xF67FDB: RARunnable::~RARunnable() (RARunnable.cpp:55)
   by 0x1593441: ACE_Based::Runnable::decReference() (Threading.h:40)
   by 0x1592E92: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
   by 0x515EA35: ACE_OS_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so)
   by 0x5F19F8D: start_thread (pthread_create.c:311)
   by 0x6A46E1C: clone (clone.S:113)

Closes #10619
2013-08-25 13:48:55 +01:00
Nay
12973de799 Core&Tools: Fix multiple issues found by a static code coverage tool 2013-08-24 22:57:22 +01:00
Vincent-Michael
7679145da5 Core: Fix warning 2013-08-19 15:04:45 +02:00
QAston
dedeb5f9eb Fix build with gcc. Thanks to McBitter for testing. 2013-08-19 14:52:17 +02:00
QAston
0513d9c8d0 Core: Fix warnings. Make callback symbols local. 2013-08-18 20:30:38 +02:00
QAston
19343ddd55 Fix crashed caused by using openssl from multiple threads simultanously.
Note that this doesn't make BigNumber class threadsafe - it never was that way.
2013-08-18 17:44:04 +02:00
QAston
2a3370929d Fix BigNumber::AsByteArray function by returning Auto_Ptr.
Remove mutex from BigNumber class - it didn't do what it was advertised to do - consider using the "locked" array outside of the function in which it was "locked".
2013-08-18 17:44:03 +02:00
QAston
8160633e12 Core: Fix a bug in BigNumber::SetBinary 2013-08-18 17:44:02 +02:00
QAston
10fb50ad66 Core: Fix a bug in BigNumber::SetQword 2013-08-18 17:44:02 +02:00
Vincent-Michael
75e6c40630 Core/Misc: Rename some no name enums 2013-08-06 21:16:05 +02:00
Ascathor
5a9810ec08 Core/Commands: Added the rank id to .pinfo for guild data 2013-07-24 19:25:36 +02:00
Shauren
779a59e7e2 Core/Config: Refactored ConfigMgr
* Loading initial configuration files is now separate from loading any additional custom configs
2013-07-15 17:31:44 +02:00
Warpten
55338ff53b Revert "Shared/Utils: Fixed ApplyPercentModFloatVar."
This reverts commit 2005be0474.

Note to self: do not touch maths past 10 any more.
2013-07-11 11:10:05 +02:00
Warpten
2005be0474 Shared/Utils: Fixed ApplyPercentModFloatVar.
This has been around since 2010-12-11 :)
2013-07-10 21:44:08 +02:00
Nay
3561ab98ba Misc: Use override and final C++11 keywords in a few places (mostly scripts)
OVERRIDE and FINAL are TC macros (expand to nothing if compiler does not  support C++11)
2013-07-06 20:21:45 +01:00
Spp
d58a037512 Build: Set _BUILD_DIRECTIVE even if the compiler is not properly detected 2013-06-27 10:47:30 +02:00
Shauren
3c91c04758 Buildsystem/MSVC
* Fixed ACE PCH
* Removed WheatyExceptionReport sources from shared project
2013-06-15 14:07:12 +02:00
Malcrom
ec474a62e5 Core: More Function Renaming. 2013-06-11 21:25:12 -02:30
Shauren
ef15fe8ed2 Core/Instances: Fixed a bug that caused switching group leader inside active instance to cause players not being saved when a boss was killed.
Closes #5109
2013-06-11 15:50:08 +02:00
Subv
1d1bb84cf9 Merge pull request #9854 from Ascathor/master
Core/Command: Optimized .pinfo more
2013-06-02 17:52:27 -07:00
Vincent-Michael
15b055fe87 Core/Database: Fix bad sql query in 55b3819d12 (thx Shauren) 2013-06-01 23:47:46 +02:00
Subv
55b3819d12 Core/Database: Deleted characters will no longer be loaded when sending the SMSG_CHAR_ENUM packet. 2013-06-01 12:57:37 -05:00
Ascathor
fb52e9ea03 Core/Command: Optimized .pinfo more
* Moved some checks around
* Added RBAC Permission for Email, last login and last ip (group 3 and 4) -- If missing RBAC permission, then it displays "Unauthorized (RBAC)"
* Changed totalmail output from uint64 to uint32
* Level either puts Max level, or a list of information necessary
* Only queries guild if the current xp query also detects guild membership
* Incorporated recent changes into code
* Commander requires higher than target to get sensitive data beside RBAC permission.
2013-05-26 14:21:39 +02:00
Shauren
590133c2b0 Missed change for previous commit 2013-05-24 18:33:33 +02:00
Bezo
178cb300d1 Implement .arena commands - add new commands to the core to handle with arena teams.
*.arena create [player] "arena name" [type]
	*.arena create "arena name" [type]
	*.arena disband [TeamID]
	*.arena rename "oldName" "newName"
	*.arena captain [TeamID] [Player]
	*.arena info [TeamID]
	*.arena lookup [name]
2013-05-22 00:50:51 +03:00
Aokromes
78840516f1 Merge pull request #9827 from Ascathor/master
Core/Command: Rework .PInfo and give more output and add Gender to trinity_string
2013-05-21 09:41:18 -07:00
Spp
00c1168897 Core/Misc: Remove trailing whitespace, compile warnings and minor cosmetic changes 2013-05-21 08:37:28 +02:00
Ascathor
051d6ef925 Core/Command: Rework PInfo and give more output and add Gender to trinity_string
* Prints out in several strings instead of few
* Leaves unnecessary ones out (e.g. phase for GMs)
* Some code documentation included (including doxygen)
* Cleaner code (partly)
* Prints more content, e.g.:
** Localized Class- and Race names
** Localizable Gender names
** Current experience, required experience
** And more

Shoutouts to @Nay, @Subv, @Shauren and several others from the irc

Core/Command: Rework PInfo and give more output and add Gender to trinity_string
2013-05-20 03:09:34 +02:00
Shauren
d6709ed610 Reverted part of 8be181c7e6 that was not supposed to be pushed 2013-05-18 11:49:46 +02:00
Shauren
8be181c7e6 Core/Misc: Fixed a bunch of issues found by static analysis 2013-05-17 20:39:53 +02:00
Nay
60dae46462 Core: Fix compiler warnings 2013-05-16 01:10:53 +01:00
Shauren
8e1601e202 Core/Debugging: Marked assert functions as non returning 2013-05-13 18:12:01 +02:00
Shauren
86d846e627 Core: Fixed windows compile 2013-05-13 18:10:20 +02:00
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
xjose93
f2b6b2f95e Core/Commands: Improve .character rename [name], now can force rename .character rename [name] [newName] 2013-04-29 11:26:54 +02:00
Aokromes
1087e5f5c9 Merge pull request #9710 from xjose93/Autobroadcast
Core/World: Improvements in Autobroadcast system (dropped from world database and moved to auth database, added realmid and weight columns)
2013-04-27 05:02:48 -07:00
Aokromes
e486cd7623 Merge pull request #9662 from xjose93/GuildRename
Guild rename
2013-04-27 05:02:07 -07:00
xjose93
d7e9d1bafb Core/World: Improvements in Autobroadcast system (dropped from world database and moved to auth database, added realmid and weight columns) 2013-04-25 22:54:20 +02:00
Bezo
7542049eba [Ip2nationLock] Implement the ip2nation lock country. 2013-04-22 15:53:48 +02:00
xjose93
678cade116 Core/Commands: rename guilds (.guild rename "old guildname" "new guildname") 2013-04-19 23:21:23 +02:00
Spp
d7d62e4248 Core: Fix compile with WITH_COREDEBUG option enabled 2013-03-26 19:34:49 +01:00
Spp
3c6c8c1117 Core/Misc: Remove the use of logging system from WPFatal (Fixes tools compile)
Closes #9501
2013-03-26 09:44:01 +01:00
Spp
1a6a23ec96 Core/Misc: Minor optimizations (+code changes to reduce differences with 4.3.4 branch)
Core/Logging: Create new logger type "Cheat". Will be used to log all cheat attempts
2013-03-25 13:26:48 +01:00
Nay
4e1a4b3ce4 Core/DB: Fix a table name in CHAR_SEL_MAIL_LIST_INFO 2013-03-17 18:19:15 +00:00
Bezo
228d9803f3 Scripts/Commands: Add .list mail $char/$guid command
Prints a list of mails received by the characters

Closs #9421
2013-03-17 17:32:24 +00:00
Vincent_Michael
4ee0a4a446 Revert "Core/Commands: Optimize for command .npc near"
This reverts commit 4e789d4c5c.
2013-03-09 23:28:32 +01:00
Vincent_Michael
4e789d4c5c Core/Commands: Optimize for command .npc near 2013-03-09 23:05:27 +01:00
Vincent_Michael
8aaaaedbdd Core: Fix warnings for msvc 2013-03-09 01:49:05 +01:00
Nay
41c7f35a31 Merge pull request #9385 from thomas007788/Doxygen
First step of comment style refactoring to doxygen-style.
2013-03-08 16:25:05 -08:00
Nay
c7463c5f6c Buildsystem: Add support for compiling with MinGW on Windows
Tested with:
- Windows 8 x64
- MySQL 5.5.30 win32
- OpenSSL 1.0.1c (32 bits)
- No PCH
- MinGW with GCC 4.7.0

TODO:
- Fix compile/link with PCH enabled
- Fix compile with WheatyExceptonionReport enabled (ignored for now)
- Fix compile of .rc files (ignored for now)
- Test with more platforms
2013-03-09 00:12:50 +00:00