Skip to content

Handle negative cost

xdebug used to emit negative costs, but no longer does. Many versions and oputput files still in the wild that do have negative costs still exist, however, and KCG was often hanging writing to stderr about garbage at the end of the line (the negative cost it couldn't parse as unsigned) when loading files. This checks for those and if so, clamps to zero, speeding up load times.

See: https://github.com/xdebug/xdebug/commit/688c552e620dc5be7eea22cb893c6b71f395c6d4

Merge request reports