Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #16  
Old 10-02-2012, 06:11 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by sorvani View Post
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. ;]
Reply With Quote
  #17  
Old 10-02-2012, 08:38 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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.
Reply With Quote
  #18  
Old 10-03-2012, 11:31 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

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.
Reply With Quote
  #19  
Old 10-03-2012, 11:49 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

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

Code:
2985 + #pragma optimize( "", off )
Reply With Quote
  #20  
Old 10-03-2012, 02:25 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:13 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3