Originally Posted By: LittleBlueThing
FWIW I got dragged kicking and screaming down a rabbit hole over the past few days.

For reasons best known to my subconscious I decided to put hijack into a local git repo.

Then I decided it would be a good idea to import *all* the available hijack history into said repository.

I downloaded all the patches, wrote some perl to automate it and off we went.

A few problems arose - some patches are a touch dodgy - but essentially it worked. (Nb 'tweaked' patches attached...)

But then I loaded git web and the timestamps annoyed me so I used a faketime (LD_PRELOAD hijack of the time() calls) to fake the system time for the untar/patch/git commit cycle. (Nb seems to be quite slow - the script was much faster without the timestamp fakery).


so i ported faketime to macos, and it bombed. i looked a little more closely and it's just looping:
#2254 0x000000010002843d in time ()
#2255 0x0000000100028c53 in fake_gettimeofday ()
#2256 0x00000001000285b9 in gettimeofday ()
#2257 0x00007fff80803aa2 in time ()
#2258 0x0000000100028407 in _ftpl_time ()
#2259 0x000000010002843d in time ()
#2260 0x0000000100028c53 in fake_gettimeofday ()

well, i narrowed it down to basically, you can't override gettimeofday. unsure why. but either without DYLD_FORCE_FLAT_NAMESPACE you don't override, or with it, you get an infinite loop.