tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (working)
[personal profile] tim
Also trying to make this brief, since I have work in progress (and am trying not to get sucked back into it tonight! Important when the train home only runs once an hour.)

Yesterday I talked about the bug involving a memory leak in comm, and successfully fixed the first memory leak. Today (well, really, late last night) I isolated the comm unit test that was resulting in a memory leak (exactly one string that was alloc'ed without being freed). I still haven't narrowed down the cause of that one, but it appears to be that while the class destructor in question is getting called (yesterday's fix), the code that would normally free the result of a call that happens to be in the destructor isn't getting generated. To put it more concretely, the destructor for port_ptr (the internal representation of a port) empties out the queue attached to the port in case any messages were sent out on this port, but never received by another task. In the particular test case that fails, the messages are strings. So in the destructor, there's a call to recv inside a while loop, but the result of the call never gets freed. I'm still perplexed as to what's happening here, but I know a little more than I did yesterday.

Another I worked on today, which Eric discovered, involved a change I made yesterday, which passed tests at the time, but combined with revisions from Eric, resulted in a segfault in trans when using the stage 1 compiler to build the core library. I haven't made a whole lot of headway on that yet. My guess is something involving the uses of the ++ argument mode (sometimes known as "pass-by-crash") that I added, but that may just be a prejudiced guess.

Before I got to that, though, I also fixed #2526 (I started that yesterday... the bug was that reachability wasn't visiting types, resulting in exported destructors getting marked as internal) and #2414 (very simple once I spotted it, but so simple I'm not sure it was the right fix: re-exported impls weren't getting included in metadata).

Hmm, that actually makes today seem pretty productive!

Profile

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

December 2014

S M T W T F S
 12345 6
78910 111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags