Jump to content

madmax

Community Manager & Security Lead
  • Posts

    2064
  • Joined

  • Last visited

  • Days Won

    75
  • Donations

    0.00 GBP 

Everything posted by madmax

  1. Changed Related to to Investigate and implement handling for NPCs on transports
  2. diff --git a/dep/include/g3dlite/G3D/AtomicInt32.h b/dep/include/g3dlite/G3D/AtomicInt32.h index 2d63f99..9a5722d 100644 --- a/dep/include/g3dlite/G3D/AtomicInt32.h +++ b/dep/include/g3dlite/G3D/AtomicInt32.h @@ -76,13 +76,8 @@ public: # elif defined(G3D_LINUX) || defined(G3D_FREEBSD) - int32 old; - asm volatile ("lock; xaddl %0,%1" - : "=r"(old), "=m"(m_value) /* outputs */ - : "0"(x), "m"(m_value) /* inputs */ - : "memory", "cc"); - return old; - + return __sync_fetch_and_add(&m_value, 1); + # elif defined(G3D_OSX) int32 old = m_value; @@ -115,14 +110,7 @@ public: // Note: returns the newly decremented value return InterlockedDecrement(&m_value); # elif defined(G3D_LINUX) || defined(G3D_FREEBSD) - unsigned char nz; - - asm volatile ("lock; decl %1;\n\t" - "setnz %%al" - : "=a" (nz) - : "m" (m_value) - : "memory", "cc"); - return nz; + return __sync_sub_and_fetch(&m_value, 1); # elif defined(G3D_OSX) // Note: returns the newly decremented value return OSAtomicDecrement32(&m_value); @@ -142,7 +130,9 @@ public: int32 compareAndSet(const int32 comperand, const int32 exchange) { # if defined(G3D_WIN32) return InterlockedCompareExchange(&m_value, exchange, comperand); -# elif defined(G3D_LINUX) || defined(G3D_FREEBSD) || defined(G3D_OSX) +# elif defined(G3D_LINUX) || defined(G3D_FREEBSD) + return __sync_val_compare_and_swap(&m_value, comperand, exchange); +# elif defined(G3D_OSX) // Based on Apache Portable Runtime // http://koders.com/c/fid3B6631EE94542CDBAA03E822CA780CBA1B024822.aspx int32 ret; diff --git a/dep/include/g3dlite/G3D/platform.h b/dep/include/g3dlite/G3D/platform.h index c6018bb..985301a 100644 --- a/dep/include/g3dlite/G3D/platform.h +++ b/dep/include/g3dlite/G3D/platform.h @@ -270,8 +270,13 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) {\ # ifndef __stdcall # define __stdcall # endif +# elif defined(__arm__) + + // CDECL does not apply to arm. +# define __cdecl # endif // calling conventions + /** @def G3D_CHECK_PRINTF_METHOD_ARGS() Enables printf parameter validation on gcc. */ # define G3D_CHECK_PRINTF_METHOD_ARGS __attribute__((__format__(__printf__, 2, 3))) diff --git a/dep/src/g3dlite/System.cpp b/dep/src/g3dlite/System.cpp index ce190d0..a4cfab2 100644 --- a/dep/src/g3dlite/System.cpp +++ b/dep/src/g3dlite/System.cpp @@ -524,8 +524,11 @@ static bool checkForCPUID() { // all known supported architectures have cpuid // add cases for incompatible architectures if they are added // e.g., if we ever support __powerpc__ being defined again - +#if defined(__arm__) + return false; +#else return true; +#endif } @@ -1730,6 +1733,14 @@ void System::cpuid(CPUIDFunction func, uint32& eax, uint32& ebx, uint32& ecx, ui edx = 0; } +#elif defined(G3D_LINUX) && defined(__arm__) +// non-x86 CPU; no CPUID, at least in userspace +void System::cpuid(CPUIDFunction func, uint32& eax, uint32& ebx, uint32& ecx, uint32& edx) { + eax = 0; + ebx = 0; + ecx = 0; + edx = 0; +} #else // See http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inline-assembly-and-pic-mix-well diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h index fdb423f..4561bca 100644 --- a/src/shared/ByteBuffer.h +++ b/src/shared/ByteBuffer.h @@ -545,7 +545,13 @@ class ByteBuffer { if(pos + sizeof(T) > size()) throw ByteBufferException(false, pos, sizeof(T), size()); +#if defined(__arm__) || defined(_M_ARM) + //memcpy to avoid alignment issues + T val; + memcpy((void*)&val,(void*)&_storage[pos],sizeof(T)); +#else T val = *((T const*)&_storage[pos]); +#endif EndianConvert(val); return val; } diff --git a/src/shared/Database/SQLStorageImpl.h b/src/shared/Database/SQLStorageImpl.h index 8e3768a..c9e434b 100644 --- a/src/shared/Database/SQLStorageImpl.h +++ b/src/shared/Database/SQLStorageImpl.h @@ -27,6 +27,13 @@ template<class DerivedLoader, class StorageClass> template<class S, class D> // S source-type, D destination-type void SQLStorageLoaderBase<DerivedLoader, StorageClass>::convert(uint32 /*field_pos*/, S src, D& dst) { +#if defined(__arm__) || defined(_M_ARM) + if(((unsigned)&dst)%sizeof(D)){ + //address not aligned. Use memcpy to avoid unaligned trap + D converted(src); + memcpy((void*) &dst,(void*) &converted,sizeof(D)); + }else +#endif dst = D(src); } @@ -58,6 +65,13 @@ template<class DerivedLoader, class StorageClass> template<class D> // D destination-type void SQLStorageLoaderBase<DerivedLoader, StorageClass>::convert_from_str(uint32 /*field_pos*/, char const* /*src*/, D& dst) { +#if defined(__arm__) || defined(_M_ARM) + if(((unsigned)&dst)%sizeof(D)){ + //address not aligned. Use memcpy to avoid unaligned trap + D converted(0); + memcpy((void*) &dst,(void*) &converted,sizeof(D)); + }else +#endif dst = 0; } @@ -65,6 +79,13 @@ template<class DerivedLoader, class StorageClass> template<class S, class D> // S source-type, D destination-type void SQLStorageLoaderBase<DerivedLoader, StorageClass>::default_fill(uint32 /*field_pos*/, S src, D& dst) { +#if defined(__arm__) || defined(_M_ARM) + if(((unsigned)&dst)%sizeof(D)){ + //address not aligned. Use memcpy to avoid unaligned trap + D converted(src); + memcpy((void*) &dst,(void*) &converted,sizeof(D)); + }else +#endif dst = D(src); }
  3. Changed Implemented Version to Unset Changed Milestone to 21 Changed Type to Game Event
  4. Quest was added in patch 3.3 according to wowhead, so it might need removing from TBC realm, investigation into this is needed.
  5. Issue originally reported in this thread: Cause: Speaking with @Rochet2 about the issue I have confirmed the user was using an LUA script to list all players then running GetZoneId on them. The server would crash anytime a player was in transition between maps and the script was not returned a map / zone ID. Outcome: After discussing with Rochet2 we will exclude any players from being listed in such a manner that are in transition and prevent GetZoneId or GetMap being ran on them. Rochet2 will write a fix for this which will be committed and linked in this report. This bug report will serve to track the crash and no further action is needed.
  6. Original topic links have been updated. All torrents from what I can tell are active at this time March 2017.
  7. Changed Status to In Progress Changed Assigned to H0zen Changed Version to 22.1 Changed Implemented Version to Unset Changed Milestone to 21
  8. This is a known issue and will be fixed as soon as we finish rewriting the entire transports system. This is a duplicate of issue: And thus being closed.
  9. Version 0.21.GitHub

    2525 downloads

    Mangos Three Server - 0.21 For: World of Warcraft: Cataclysm Wiki: https://www.getmangos.eu/wiki/documentation/installation-guides/ Status: Testing, Unstable, Development Support client versions: 4.3.4 (15595) MangosThree-Serverx86.zip (32 Bit) MangosThree-Serverx64.zip (64 Bit) Builtin Scripts (SD3 & Eluna) Map Extractors Realm, World & Character databases Authentication Realm-Daemon server (realmd) Mangos-Daemon world server (Mangosd) Requirements: C++ Redistributable for Visual Studio 2015 (Included in .zip)
  10. The "SET GLOBAL" variables used in the .sql update scripts were working prior to 5.5 but MySQL has made a change that they now need to be set in My.cnf This has been tested and verified by both myself and @H0zen. Making this entry so we can get a push at getting this changed or whatever changes are needed. It should be noted that only one .sql file in all of the updates actually need these lines added and I feel they are being overused. SET GLOBAL Statements SET GLOBAL net_read_timeout=30; SET GLOBAL net_write_timeout=60; SET GLOBAL net_buffer_length=1000000; SET GLOBAL max_allowed_packet=1000000000; SET GLOBAL connect_timeout=10000000; MariaDB This issue is very obvious on MariaDB since it actually rejects the SET GLOBAL (i can only hope MySQL implement this). MariaDB sends back an error and fails the script from running any further. MySQL silently fails and continues to run the script. Currently to get updates to apply to MairaDB based server you have to remove the lines entirely from the top of the .sql files. My Recommendation: For updates that need the variables added we should add a special update step that forces the user to either make the change in My.cnf or enter the changes in the server console which would stay in effect until the server is restarted. A simple step in the scripts that need these settings to check what the server value is, is what we really need. Now awaiting feedback of other developers and @antz
  11. Version 2.4.3 8606

    137 downloads

    2.4.3 These patches are for the Mac OSX client. Patch Notes Patches 2.4.2 to 2.4.3 Once on the mega site just right-click and download the patches you need Contains: WoW-2.4.2.8278-to-2.4.3.8606-deDE-patch.zip WoW-2.4.2.8278-to-2.4.3.8606-enGB-patch.zip WoW-2.4.2.8278-to-2.4.3.8606-enUS-patch.zip WoW-2.4.2.8278-to-2.4.3.8606-esES-patch.zip WoW-2.4.2.8278-to-2.4.3.8606-frFR-patch.zip WoW-2.4.2.8278-to-2.4.3.8606-koKR-patch.zip WoW-2.4.2.8278-to-2.4.3.8606-ruRU-patch.zip
  12. Version 2.4.2 8209

    68 downloads

    2.4.2 These patches are for the Mac OSX client. Patch Notes Patches 2.0.x to 2.4.2 Once on the mega site just right-click and download the patches you need Contains: WoW-2.4.2-deDE-patch.zip
  13. Version 2.4.1 8125

    70 downloads

    2.4.1 These patches are for the Mac OSX client. Patch Notes Patches 2.4.0 to 2.4.1 Once on the mega site just right-click and download the patches you need Contains: WoW-2.4.0.8089-to-2.4.1.8125-enGB-patch.zip WoW-2.4.0.8089-to-2.4.1.8125-enUS-patch.zip WoW-2.4.0.8089-to-2.4.1.8125-esES-patch.zip WoW-2.4.0.8089-to-2.4.1.8125-frFR-patch.zip WoW-2.4.0.8089-to-2.4.1.8125-koKR-patch.zip
  14. Version 2.4.0 8089

    58 downloads

    2.4.0 Fury of the Sunwell These patches are for the Mac OSX client. Patches 2.0.x to 2.4.0 Once on the mega site just right-click and download the patches you need Contains: WoW-2.4.0-enGB-patch.zip WoW-2.4.0-enUS-patch.zip WoW-2.4.0-esES-patch.zip WoW-2.4.0-frFR-patch.zip
  15. Version 2.4.0 8089

    17 downloads

    2.4.0 These patches are for the Mac OSX client. Patch Notes Patches 2.3.3 to 2.4.0 Once on the mega site just right-click and download the patches you need Contains: WoW-2.3.3.7799-to-2.4.0.8089-deDE-patch.zip WoW-2.3.3.7799-to-2.4.0.8089-enGB-patch.zip WoW-2.3.3.7799-to-2.4.0.8089-enUS-patch.zip WoW-2.3.3.7799-to-2.4.0.8089-esES-patch.zip WoW-2.3.3.7799-to-2.4.0.8089-frFR-patch.zip WoW-2.3.3.7799-to-2.4.0.8089-koKR-patch.zip
  16. Version 2.3.3 7799

    21 downloads

    2.3.3 These patches are for the Mac OSX client. Patch Notes Patches 2.3.2 to 2.3.3 Once on the mega site just right-click and download the patches you need Contains: WoW-2.3.2.7741-to-2.3.3.7799-deDE-patch.zip WoW-2.3.2.7741-to-2.3.3.7799-enGB-patch.zip WoW-2.3.2.7741-to-2.3.3.7799-enUS-patch.zip WoW-2.3.2.7741-to-2.3.3.7799-esES-patch.zip WoW-2.3.2.7741-to-2.3.3.7799-frFR-patch.zip WoW-2.3.2.7741-to-2.3.3.7799-koKR-patch.zip
  17. Version 2.3.2 7741

    19 downloads

    2.3.2 These patches are for the Mac OSX client. Patch Notes Patches 2.3.0 to 2.3.2 Once on the mega site just right-click and download the patches you need Contains: WoW-2.3.0.7561-to-2.3.2.7741-deDE-patch.zip WoW-2.3.0.7561-to-2.3.2.7741-enGB-patch.zip WoW-2.3.0.7561-to-2.3.2.7741-enUS-patch.zip WoW-2.3.0.7561-to-2.3.2.7741-esES-patch.zip WoW-2.3.0.7561-to-2.3.2.7741-frFR-patch.zip WoW-2.3.0.7561-to-2.3.2.7741-koKR-patch.zip
  18. Version 2.3.0 7561

    22 downloads

    These patches are for the Mac OSX client. Once on the mega site right-click and download the patch you need. Download page contains: WoW-2.3.0-koKR-patch.zip
  19. Version 1.12.x

    272 downloads

    These patches are for the Mac OSX client. Once on the mega site right-click and download the patch you need. Download page contains: WoW-1.12.0-deDE-patch.zip WoW-1.12.0-enGB-patch.zip WoW-1.12.0.5595-to-1.12.1.5875-enGB-patch.zip WoW-1.12.0-enUS-patch.zip WoW-1.12.0.5595-to-1.12.1.5875-enUS-patch.zip WoW-1.12.0-frFR-patch.zip
  20. Currently users are reporting that they are getting kicked by warden with reason "Exceeded warden response delay". Warden commit: https://github.com/mangoszero/server/commit/1ff6c40b0d95e21ba220158eb010dc310fb85d8b
  21. She must be very pleased lol
  22. Version 0.21.GitHub

    7584 downloads

    Mangos Zero Server with playerbots For: World of Warcraft Classic Install Guides: https://www.getmangos.eu/wiki/documentation/installation-guides/ Status: Playable Support client versions: 1.12.1 (build 5875),1.12.2 (build 6005) and 1.12.3 (build 6141) MangosZero-Serverx86.zip (32 bit) MangosZero-Serverx64.zip (64 bit) Built in Scripts (SD3 & Eluna) Playerbot Allows players to spawn bots to group up and play with them. Settings for this are in aiplayerbot.conf.dist This can be enabled or disabled in the config file Map Extractors Realm, World & Character databases Authentication Realm-Daemon server (realmd) Mangos-Daemon world server (Mangosd) Requirements: C++ Redistributable for Visual Studio 2015 (Included in .zip)
  23. Version 3.3.5a 12340

    1821 downloads

    3.3.5a Patch Notes Patches 3.3.5 to 3.3.5a Once on the mega site just right-click and download the patches you need Contains: WoW-3.3.5.12213-to-3.3.5.12340-deDE-patch.exe WoW-3.3.5.12213-to-3.3.5.12340-enGB-patch.exe WoW-3.3.5.12213-to-3.3.5.12340-enUS-patch.exe WoW-3.3.5.12213-to-3.3.5.12340-esES-patch.exe WoW-3.3.5.12213-to-3.3.5.12340-esMX-patch.exe WoW-3.3.5.12213-to-3.3.5.12340-frFR-patch.exe WoW-3.3.5.12213-to-3.3.5.12340-ruRU-patch.exe
  24. Version 3.3.5 12213

    600 downloads

    3.3.5 Patch Notes Patches 3.3.3a to 3.3.5 Once on the mega site just right-click and download the patches you need Contains: WoW-3.3.3.11723-to-3.3.5.12213-deDE-patch.exe WoW-3.3.3.11723-to-3.3.5.12213-enGB-patch.exe WoW-3.3.3.11723-to-3.3.5.12213-enUS-patch.exe WoW-3.3.3.11723-to-3.3.5.12213-esES-patch.exe WoW-3.3.3.11723-to-3.3.5.12213-esMX-patch.exe WoW-3.3.3.11723-to-3.3.5.12213-frFR-patch.exe WoW-3.3.3.11723-to-3.3.5.12213-ruRU-patch.exe
  25. Version 3.3.3a 11723

    485 downloads

    3.3.3a Patch Notes Patches 3.3.3 to 3.3.3a Once on the mega site just right-click and download the patches you need Contains: WoW-3.3.3.11685-to-3.3.3.11723-deDE-patch.exe WoW-3.3.3.11685-to-3.3.3.11723-enGB-patch.exe WoW-3.3.3.11685-to-3.3.3.11723-enUS-patch.exe WoW-3.3.3.11685-to-3.3.3.11723-esES-patch.exe WoW-3.3.3.11685-to-3.3.3.11723-esMX-patch.exe WoW-3.3.3.11685-to-3.3.3.11723-frFR-patch.exe WoW-3.3.3.11685-to-3.3.3.11723-ruRU-patch.exe
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use