Skip to content
Snippets Groups Projects
  • Henrik (Grubba) Grubbström's avatar
    d5a5bf0d
    Pike.identify_cycle: Fixed global variable overwrite. · d5a5bf0d
    Henrik (Grubba) Grubbström authored
    Pike.identify_cycle() uses a mapping internally, and insert into
    mappings can call Pike code (via LFUN:__hash()), which could
    have a different thread also start messing with the same variables.
    
    This fixes the multi-thread case, but there's still a problem if it
    starts to recurse (ie LFUN::__hash() calling Pike.identify_cycle()
    or Pike_count_memory()).
    d5a5bf0d
    History
    Pike.identify_cycle: Fixed global variable overwrite.
    Henrik (Grubba) Grubbström authored
    Pike.identify_cycle() uses a mapping internally, and insert into
    mappings can call Pike code (via LFUN:__hash()), which could
    have a different thread also start messing with the same variables.
    
    This fixes the multi-thread case, but there's still a problem if it
    starts to recurse (ie LFUN::__hash() calling Pike.identify_cycle()
    or Pike_count_memory()).