dictu-lang / Dictu

Dictu is a high-level dynamically typed, multi-paradigm, interpreted programming language.
https://dictu-lang.com
MIT License
267 stars 53 forks source link

fix: when executing a child process, do not waitpid before reading #753

Closed liz3 closed 3 weeks ago

liz3 commented 4 weeks ago

Trying to waitpid before reading the piped content will lead to a blocked pipe and get the child process "stuck". So it should be read BEFORE waitpid is called. Further there was a bug within the reallocation logic leading to heap corruption because the comparison size did not include the just read chunk, leading to heap corruption, which itself led to reallocate failing.

What's Changed:

Type of Change:

#

Housekeeping:

Jason2605 commented 3 weeks ago

Nice, thank you!