Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseSMCFile crash on x64 when gamedata file uses windows line endings #2172

Open
bottiger1 opened this issue Jun 1, 2024 · 0 comments
Open
Labels
Bug general bugs; can be anything x64 Exclusive to x86_64 support

Comments

@bottiger1
Copy link
Contributor

bottiger1 commented Jun 1, 2024

Only happens on 64 bits and only happens if the file uses windows instead of linux line endings

misc.txt

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fc29f81edb2 in TextParsers::ParseStream_SMC (this=<optimized out>, stream=0x7cb6d40, srdr=0x7fc29f81fa50 <FileStreamReader(void*, char*, unsigned long, unsigned int*)>, smc=0xf655fb0, pStates=0x7fff110fe170) at /home/tf2/extensions/sdk/sourcemod/core/logic/TextParsers.cpp:457
457                                             if ((&parse_point[i] != in_buf) && c == '"' && parse_point[i-1] != '\\')
[Current thread is 1 (Thread 0x7fc2b4d1b740 (LWP 38868))]
#0  0x00007fc29f81edb2 in TextParsers::ParseStream_SMC (this=<optimized out>, stream=0x7cb6d40, srdr=0x7fc29f81fa50 <FileStreamReader(void*, char*, unsigned long, unsigned int*)>, smc=0xf655fb0, pStates=0x7fff110fe170) at /home/tf2/extensions/sdk/sourcemod/core/logic/TextParsers.cpp:457
#1  0x00007fc29f81e678 in TextParsers::ParseSMCFile (this=0x7fc29f977d38 <g_TextParser>, file=<optimized out>, smc_listener=0x7fff110fcf31, states=0x7fff110fe170, buffer=0x7fff11103550 "Unknown error", maxsize=256) at /home/tf2/extensions/sdk/sourcemod/core/logic/TextParsers.cpp:142
#2  0x00007fc29f83ac0f in CGameConfig::EnterFile (this=0xf655fb0, file=<optimized out>, error=0x7fff11103550 "Unknown error", maxlength=0) at /home/tf2/extensions/sdk/sourcemod/core/logic/GameConfigs.cpp:962
#3  0x00007fc29f83a791 in CGameConfig::Reparse (this=0xf655fb0, error=0x7fff110fcf31 "\"\r\n\t\t\t\t}\r\n\t\t\t\t\"NET_SendLong\"\r\n\t\t\t\t{\r\n\t\t\t\t\ttype \"sym\"\r\n\t\t\t\t\tsym  \"_Z12NET_SendLongP11INetChanneliiPKciPK8sockaddrii\"\r\n\t\t\t\t\tlib  \"engine\"\r\n\t\t\t\t}\r\n\t\t\t\t\"NET_SendTo\"\r\n\t\t\t\t{\r\n\t\t\t\t\ttype \"sym\"\r\n\t\t\t\t\tsym  \"_Z1"..., maxlength=34) at /home/tf2/extensions/sdk/sourcemod/core/logic/GameConfigs.cpp:837
#4  0x00007fc29f838e77 in GameConfigManager::LoadGameConfigFile (this=0x7fc29f978e18 <g_GameConfigs>, file=0x7fc27b3a3d2a "misc", _pConfig=0x7fff11100360, error=0x1 <error: Cannot access memory at address 0x1>, maxlength=140733479636785) at /home/tf2/extensions/sdk/sourcemod/core/logic/GameConfigs.cpp:1195
@psychonic psychonic added x64 Exclusive to x86_64 support Bug general bugs; can be anything labels Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug general bugs; can be anything x64 Exclusive to x86_64 support
Projects
None yet
Development

No branches or pull requests

2 participants