-
-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Description
https://crash.limetech.org/7txceegvqyfk
I was traking the crash and find that NameHashSet is weird.
For example:
key declarated but not used.
sourcemod/public/sm_namehashset.h
Lines 128 to 136 in 38eecd5
| bool retrieve(const char *aKey, T *value) | |
| { | |
| CharsAndLength key(aKey); | |
| Result r = table_.find(aKey); | |
| if (!r.found()) | |
| return false; | |
| *value = *r; | |
| return true; | |
| } |
sourcemod/public/sm_namehashset.h
Lines 148 to 153 in 38eecd5
| bool contains(const char *aKey) | |
| { | |
| CharsAndLength key(aKey); | |
| Result r = table_.find(aKey); | |
| return r.found(); | |
| } |
I'm not sure that find all problems in class.
Crash may not to be connected with bad code.
Crash results:
Coruppted entry in HashTable, whitch may cause by:
- Whole entry is incorrect (coruppted table)
- Wrong entry's payload (pointer)
- Pointer correct but virtual table pointer was coruppted
For cases 1 and 2 need to looking in SM code for reason, in case 3 it's external problem.
How to figure it out that exactly, no idea yet.
SM version 1.10-6502, but upstream 1.10-dev (0b468f2) and master (38eecd5) same in this part.
Crash tracing:
sourcemod.2.csgo.so!CommandFlagsHelper::ConCommandPolicy::matches INLINED https://github.com/alliedmodders/sourcemod/blob/617fb77ea02076cc70be84c6092ebcfc81d54cc2/core/smn_console.cpp#L185
sourcemod.2.csgo.so!ke::HashTable<SourceMod::NameHashSet::Policy<ConCommandBase *, CommandFlagsHelper::ConCommandPolicy>, ke::SystemAllocatorPolicy>::lookup INLINED https://github.com/alliedmodders/amtl/blob/e00a845c6bc415995ddc4b7ec538d1704fdd0122/amtl/am-hashtable.h#L304
sourcemod.2.csgo.so!ke::HashTable<SourceMod::NameHashSet::Policy<ConCommandBase *, CommandFlagsHelper::ConCommandPolicy>, ke::SystemAllocatorPolicy>::find INLINED https://github.com/alliedmodders/amtl/blob/e00a845c6bc415995ddc4b7ec538d1704fdd0122/amtl/am-hashtable.h#L430
sourcemod.2.csgo.so!SourceMod::NameHashSet<ConCommandBase *, CommandFlagsHelper::ConCommandPolicy>::retrieve https://github.com/alliedmodders/sourcemod/blob/617fb77ea02076cc70be84c6092ebcf/public/sm_namehashset.h#L133
sourcemod.2.csgo.so!CommandFlagsHelper::GetFlags INLINED https://github.com/alliedmodders/sourcemod/blob/617fb77ea02076cc70be84c6092ebcfc81d54cc2/core/smn_console.cpp#L141
sourcemod.2.csgo.so!GetCommandFlags https://github.com/alliedmodders/sourcemod/blob/617fb77ea02076cc70be84c6092ebcfc81d54cc2/core/smn_console.cpp#L1070
sm_command_eater.smx::.2960.CommandExists
Here is a lot inline optimizations. Crashed on line 79 on virtual call of ConCommandBase::GetName referenced to
sourcemod/core/smn_console.cpp
Line 185 in 617fb77
| return strcmp(name, base->GetName()) == 0; |

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels