View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001856 | Spring engine | General | public | 2010-03-02 20:28 | 2013-08-25 05:11 |
| Reporter | tvo | Assigned To | jK | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | not fixable | ||
| Product Version | 0.81.2 | ||||
| Summary | 0001856: MSVC vs GCC sync | ||||
| Description | Tracking issue for data related to MSVC vs GCC sync. DeadnightWarrior and I just tried it with 0.81.2. Log attached. For the lazy: it desyncs in 'heading += tmp;' in GroundMoveType.cpp:632 | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
GCC assembler generated for that line (Debug-Sync_Trace-Sync_Debug): movl 8(%ebp), %eax movss 76(%eax), %xmm0 cvttss2si %xmm0, %eax movw %ax, -30(%ebp) |
|
|
MSVC assembler (Enable Enhanced Instruction Set: SSE was OFF :/) ; 622 : ; 623 : ASSERT_SYNCED_PRIMITIVE(deltaHeading); ; 624 : ASSERT_SYNCED_PRIMITIVE(turnRate); ; 625 : ASSERT_SYNCED_PRIMITIVE((short)turnRate); ; 626 : ; 627 : short sTurnRate = short(turnRate); fld DWORD PTR [esi+116] push edi mov edi, DWORD PTR [esi+68] sub bx, WORD PTR [edi+112] movzx ebp, WORD PTR [edi+112] add edi, 112 ; 00000070H mov WORD PTR [esi+144], bx call __ftol2_sse movzx eax, ax |
|
|
MSVC assembler (Enable Enhanced Instruction Set: SSE was ON) ; 622 : ; 623 : ASSERT_SYNCED_PRIMITIVE(deltaHeading); ; 624 : ASSERT_SYNCED_PRIMITIVE(turnRate); ; 625 : ASSERT_SYNCED_PRIMITIVE((short)turnRate); ; 626 : ; 627 : short sTurnRate = short(turnRate); cvttss2si ecx, DWORD PTR [esi+116] push edi mov edi, DWORD PTR [esi+68] movzx ebx, WORD PTR [edi+112] add edi, 112 ; 00000070H mov ax, bp sub ax, WORD PTR [edi] movzx ecx, cx mov WORD PTR [esi+144], ax |
|
|
Baw, fake desync due to `&& defined(__GNUC__)': #if defined(SYNCDEBUG) && defined(__GNUC__) #define ASSERT_SYNCED_PRIMITIVE(x) { SyncedPrimitive<typeof(x)>(x); } #else #define ASSERT_SYNCED_PRIMITIVE(x) #endif |
|
|
Fixed that, now desyncs after a few minutes with following trace: (Enable Enhanced Instruction Set: SSE was ON for GroundMoveType.cpp only) ===> Tue Mar 2 23:38:06 2010 <=== trying debug symbols file: '/opt/spring-dev/bin/spring.dbg' executable name: '/opt/spring-dev/bin/spring' Syncdebugger initialised Client: checksum response sent Server: got checksum response from 1 Server: got checksum response from 0 Server: queuing block requests Server: blocks: 2047 equal, 1 not equal Server: checksum responses received; 1 block requests queued Client: block response sent for block 214 addr2line command : 'addr2line "--exe=/opt/spring-dev/bin/spring" --functions --demangle --inline 0x86fc3cb 0x86f08ac 0x86ef41f 0x878a286 0x83c87af' Server: block responses received Server: position in history: 442884 Server: chk 618736BC instead of 596B6634 frame 004710, (value=0000ebef 8.46370259e-41) backtrace 1 in "+=signed short" Server: chks: 2047 equal, 1 not equal Server: === Backtrace 1 === Server: 0 SyncedPrimitive<short>::operator+=(short) [/home/tobi/wd/spring/repo-dev/rts/System/Sync/SyncedPrimitive.h:103] Server: 1 CGroundMoveType::ChangeHeading(short) [/home/tobi/wd/spring/repo-dev/rts/Sim/MoveTypes/GroundMoveType.cpp:632] Server: 2 CGroundMoveType::Update() [/home/tobi/wd/spring/repo-dev/rts/Sim/MoveTypes/GroundMoveType.cpp:312] Server: 3 CUnitHandler::Update() [/home/tobi/wd/spring/repo-dev/rts/Sim/Units/UnitHandler.cpp:281] Server: 4 CGame::SimFrame() [/home/tobi/wd/spring/repo-dev/rts/Game/Game.cpp:3508] Server: Done! |
|
|
And similar although slightly different desync with Enable Enhanced Instruction Set: SSE set to OFF for entire project again. See syncdebug-server-2.log Seems like it's time to compare the assembly for the method between GCC and MSVC... |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-03-02 20:28 | tvo | New Issue | |
| 2010-03-02 20:28 | tvo | File Added: syncdebug-server.log | |
| 2010-03-02 20:38 | tvo | Note Added: 0004708 | |
| 2010-03-02 20:42 | tvo | Note Added: 0004709 | |
| 2010-03-02 20:45 | tvo | Note Added: 0004710 | |
| 2010-03-02 20:45 | tvo | Note Edited: 0004710 | |
| 2010-03-02 20:50 | tvo | Note Edited: 0004709 | |
| 2010-03-02 20:57 | tvo | Note Edited: 0004709 | |
| 2010-03-02 20:57 | tvo | Note Edited: 0004710 | |
| 2010-03-02 22:11 | tvo | Note Added: 0004711 | |
| 2010-03-02 23:41 | tvo | Note Added: 0004713 | |
| 2010-03-02 23:41 | tvo | Note Edited: 0004713 | |
| 2010-03-02 23:54 | tvo | Note Edited: 0004713 | |
| 2010-03-02 23:56 | tvo | File Added: syncdebug-server-2.log | |
| 2010-03-03 00:01 | tvo | Description Updated | |
| 2010-03-03 00:16 | tvo | Note Added: 0004715 | |
| 2013-08-25 05:11 | jK | Status | new => closed |
| 2013-08-25 05:11 | jK | Assigned To | => jK |
| 2013-08-25 05:11 | jK | Resolution | open => not fixable |