Skip to content
  • Marius Gerbershagen's avatar
    stacks.d: fix several problems with C stack · e37fafb3
    Marius Gerbershagen authored and Daniel Kochmański's avatar Daniel Kochmański committed
    ecl_cs_set_org and cs_set_size had several problems:
    -the size of the stack was estimated to be 1/2 of the actual value,
     which could lead to wrong stack overflow errors. In particular, we
     cannot assume that the stack pointer will always start at the stack
     origin and increase/decrease linearly (counterexamples could
     include callbacks from other threads).
    -despite its name, cs_set_size did not actually set the stack size
     even on systems where this is possible at runtime.
    -there were several magic numbers used.
    e37fafb3