FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
554 stars 107 forks source link

Сетевые буферы — отрицатильные значения iCurBits, nDataBits #271

Closed the-swank closed 7 years ago

the-swank commented 7 years ago

0 0x5658cb80 in pfnMessageEnd () at server/sv_game.c:2623

    name = 0x56602769 "svc_temp_entity"
    org = 0x0

$1 = {bOverflow = true, pDebugName = 0x565fcc98 "Multicast", pData = 0x569e4e7c <sv+1302908> "3\177\006", iCurBit = -2146843648, nDataBits = -2146843648}

Из-за этого происходит ошибка сегментации https://github.com/FWGS/xash3d/blob/0.19.x/engine/server/sv_game.c#L2622

the-swank commented 7 years ago

Вот ещё

Program received signal SIGSEGV, Segmentation fault.
0x5659b4b9 in BF_WriteUBitLongExt (bf=0xf5bb02d0, 
    curData=8, numbits=8, bCheckRange=true)
    at common/net_buffer.c:165
165         ((dword *)bf->pData)[iDWord] &= BitWriteMasks[iCurBitMasked][nBitsLeft];
#0  0x5659b4b9 in BF_WriteUBitLongExt (bf=0xf5bb02d0, 
    curData=8, numbits=8, bCheckRange=true)
    at common/net_buffer.c:165
        nBitsLeft = 8
        iCurBitMasked = 0
        iCurBit = -2146843520
        iDWord = 4227878436
        nBitsWritten = <optimized out>
#1  0x5659b716 in BF_WriteByte (bf=0xf5bb02d0, val=8)
    at common/net_buffer.c:310
No locals.
#2  0x5655a940 in SV_BroadcastPrintf (level=2, 
    fmt=0x565faba5 "%s overflowed\n")
    at server/sv_cmds.c:74
        string = "pipe overflowed\n", '\000' <repeats 4079 times>
        argptr = 0xffffd528 "$\035\326\365,\246VV\bt'\366\b"
        cl = 0xf5bb0028
        i = 0
#3  0x5656a774 in SV_SendClientMessages ()
    at server/sv_frame.c:784
        cl = 0xf5d61d20
        i = 2
#4  0x5656bf42 in Host_ServerFrame ()
    at server/sv_main.c:692
No locals.
#5  0x565aca09 in Host_Frame (time=0.00604964606)
    at common/host.c:744
No locals.
#6  0x565aca6a in Host_RunFrame () at common/host.c:235
        oldtime = 1066274.8073759889
        newtime = 1066274.813425635
#7  0x565aca9e in Host_FrameLoop () at common/host.c:257
No locals.
#8  0x565ae10c in Host_Main (argc=7, argv=0xffffd734, 
    progname=0x565ffd34 "valve", bChangeGame=0, 
    func=0x56596ec5 <Launcher_ChangeGame>)
    at common/host.c:1273
No locals.
#9  0x56596f9f in main (argc=<optimized out>, 
    argv=<optimized out>) at common/launcher.c:86
        gamedir_buf = '\000' <repeats 31 times>
        gamedir = 0x565ffd34 "valve"
No symbol "bf" in current context.
#9  0x56596f9f in main (argc=<optimized out>, 
    argv=<optimized out>) at common/launcher.c:86
86      return Host_Main( g_iArgc, g_pszArgv, gamedir, 0, &Launcher_ChangeGame );

$4 = {bOverflow = false, 
  pDebugName = 0x56601240 "NetData", 
  pData = 0xf5bb02e4 "\f", iCurBit = -2146843520, 
  nDataBits = 640000}