EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Underfoot Disconnects (https://www.eqemulator.org/forums/showthread.php?t=35794)

ghanja 10-02-2012 06:11 PM

Quote:

Originally Posted by sorvani (Post 213059)
That conditional is not the problem, but i agree that the conditional should not be needed.

The problem is optimization. disable it and everything works. Will work on putting in a pragma to disable optimization for sections of code that need it later. KLS mentioned that Akkadius had something done up on this in testing once, so might get it sooner rather than later.

Any idea off the top of your head which functions experience problems with optimization?

I'm still two hours out of even being in a position to look at the source to see what pragmas are being used, sorry. ;]

lerxst2112 10-02-2012 08:38 PM

Optimization shouldn't affect it unless there is undefined behavior happening. Looking at the code generated by the preprocessor would probably be helpful to see what is actually generated by the macros. It looks like an array indexed by generated enums, and it's possible there is something weird happening with that generation in the 64-bit case causing the indexing to be incorrect. I'd worry that this isn't the only place it is happening, just one where it is immediately obvious something is wrong.

I had thought that it was possible that int and int32 might be different sizes in 64-bit, but unless I'm missing a different typedef there's no guarantee that int32 is 32 bits at all, it is just an unsigned int that can be 64-bits and still be standard compliant. Both are 32-bits in Visual Studio but I thought gcc might make them 64-bits. For things that require specific sizes int32_t or uint32_t would be a better choice, but that would make the code not compile on Visual Studio 2008 without some extra work since it doesn't have the header for C99 types or support the latest standard.

sorvani 10-03-2012 11:31 AM

Unless/until someone can figure that out I have committed a fix in rev 2221 that disables optimization for just the one section of code that causes this problem.

joligario 10-03-2012 11:49 AM

I think you meant to use on instead of off here:

Code:

2985 + #pragma optimize( "", off )

sorvani 10-03-2012 02:25 PM

Hate it when i fail at copy/paste. At least it was only the HoT.cpp


All times are GMT -4. The time now is 02:11 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.