Thread: TitanHide
View Single Post
  #12  
Old 01-31-2014, 05:46
mcp mcp is offline
Friend
 
Join Date: Dec 2011
Posts: 73
Rept. Given: 4
Rept. Rcvd 12 Times in 11 Posts
Thanks Given: 7
Thanks Rcvd at 47 Times in 35 Posts
mcp Reputation: 12
Had a quick look at the source code. You have a potential infinite loop in this code in hider.cpp

Code:
//simple locking library
static bool locked=false;

static void lock()
{
    while(locked);
    locked=true;
}
if locked is true upon entry, then this is an infinite loop because locked is not declared volatile. An optimizing compiler will thus only fetch memory once, but not repeatedly in the loop.
The disassembly confirms this (see screenshot).
Attached Images
File Type: png ida.png (7.2 KB, 15 views)
Reply With Quote
The Following User Gave Reputation+1 to mcp For This Useful Post:
mr.exodia (01-31-2014)
The Following User Says Thank You to mcp For This Useful Post:
Indigo (07-19-2019)