Open bamos opened 9 years ago
I can fix this, probably easily. Feel free to comment out the free
while you work on GPT support.
I'd say memory leaks in the crawler are low-priority overall, as the crawler is not a long-lived/long-running process.
Off the top of my head, setting the pte.pte_info
field to NULL
right after the free might be the right thing to do?
It looks like it is somehow getting reused, so maybe it then needs re-allocation (ie setting it to NULL
will expose another bug). Something probably stupid happening from my end.
Hi @theonewolf, (cc @wenluhu)
gray-crawler
is giving the following stacktrace on thegpt-test.raw
image:gdb indicates this problem is coming from
mbr.c:mbr_cleanup_pte()
.I added a statement to print the address of
pte.pte_info
to this function:And indeed, the same pointer is being freed twice:
My naive fix is to comment this out so I can start working on the GPT code. This is obviously not the correct solution. :-)
Can you take a look at this when you get a chance? If this isn't something you can easily fix, I'm happy to take a closer look and send a patch.