TMI: A day of debugging-by-println
Aug. 13th, 2013 06:12 pmI really wanted to isolate that OS X spawning bug from yesterday, and today I filed #8498. It turns out the problem isn't about spawning at all, but rather, with Options that contain vector slices. The ProcessOptions struct in std::run, which represents data needed to spawn a process, has a field with type Option<&[(~str, ~str)]>: that is, it takes an option of a vector of pairs of strings representing name/value pairs for the environment. That's all fine, but the & makes it a borrowed vector, and there is apparently some bug where memory gets corrupted if you construct one and then match on it. I replaced & with ~ (which allocates more memory, since it means the process will own its environment vector, meaning that callers may have to make a copy) and that fixed the problem. Once tests finish, I'll check that in as a temporary workaround.
While browsing not-recently-updated bugs, I found #6702, an unclear-error-message bug in resolve, which was an easy fix.
The option/slice bug, which came up while working on rustpkg, took up some time, but tomorrow I really need to get back to rustpkg itself, hopefully finishing the workcache integration over the next few days.
While browsing not-recently-updated bugs, I found #6702, an unclear-error-message bug in resolve, which was an easy fix.
The option/slice bug, which came up while working on rustpkg, took up some time, but tomorrow I really need to get back to rustpkg itself, hopefully finishing the workcache integration over the next few days.