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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2010, 05:02 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

It appears to be crashing in the assembler in common/crc32.cpp.

Maybe a GCC version related issue (I use 4.1.1 without issue).

A quick thing to try rather than downgrading your GCC version would be to edit common/crc32.cpp and change line 175 from:
Code:
#elif defined(i386)
to
Code:
#elif defined(i386xxx)
and recompiling, so it should fall back to using the C version of the CRC code instead of the assembler.
Reply With Quote
  #2  
Old 03-14-2010, 05:04 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

Using sys-devel/gcc-4.3.4 . I will try that change and post my results.
Reply With Quote
  #3  
Old 03-14-2010, 05:09 PM
snorkle
Fire Beetle
 
Join Date: Oct 2009
Posts: 3
Default

I had to make some changes to get the old VZTZ source to work in Linux. I'm not sure what revision their source was based on but I ended up scrapping it for 8.0. Here's one of the things I had to change to get it to work with newer gcc versions:

Code:
vztzfebsource-read-only/common$ svn diff crc32.cpp
Index: crc32.cpp
===================================================================
--- crc32.cpp   (revision 7)
+++ crc32.cpp   (working copy)
@@ -112,6 +112,14 @@
 #undef i386    //darwin seems to think we are generating PIC, and we clobber ebx
 #endif

+/* Some 64bit systems do not like the i386 assembly code below. However, some 64bit
+   systems do work with the assembly code below. We #undef i386 to be on the safe
+   side if we are compiling 64bit. */
+
+#ifdef __x86_64__
+#undef i386
+#endif
+
 uint32 CRC32::Update(const int8* buf, uint32 bufsize, uint32 crc32) {
 #if defined(WIN32)
    // Register use:
@@ -167,8 +175,8 @@
 #elif defined(i386)
        register uint32  val __asm ( "ax" );
        val = crc32;
-
 __asm __volatile (
+       "push   %%ebx\n"
        "xorl   %%ebx, %%ebx\n"
        "movl   %1, %%esi\n"
        "movl   %2, %%ecx\n"
@@ -232,9 +240,10 @@
        "xorb   2(%%esi), %%bl\n"
        "xorl   (%%edi,%%ebx,4), %%eax\n"
    "2:\n"
+       "pop  %%ebx\n"
        :
        : "a" (val), "g" (buf), "g" (bufsize)
-       : "bx", "cx", "dx", "si", "di"
+       : "cx", "dx", "si", "di"
    );

    return val;

Last edited by gaeorn; 03-29-2010 at 02:16 AM.. Reason: add code tags around code block
Reply With Quote
  #4  
Old 03-14-2010, 05:13 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

This worked!

Quote:
Originally Posted by Derision View Post
It appears to be crashing in the assembler in common/crc32.cpp.

Maybe a GCC version related issue (I use 4.1.1 without issue).

A quick thing to try rather than downgrading your GCC version would be to edit common/crc32.cpp and change line 175 from:
Code:
#elif defined(i386)
to
Code:
#elif defined(i386xxx)
and recompiling, so it should fall back to using the C version of the CRC code instead of the assembler.
Thanks a bunch!
Reply With Quote
Reply

Thread Tools
Display Modes

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:24 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3