This revision was automatically updated to reflect the committed changes.
Closed by commit rL328761: Prevent double release of mach ports (authored by
friss, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D45011
Files:
lldb/trunk/source
jasonmolenda accepted this revision.
jasonmolenda added a comment.
This revision is now accepted and ready to land.
valgrind/asan/msan aren't going to help - this is a pretty obscure stuff. We
could verify by hand that we're not leaking a port if this code was actually
executed via lsmp(1) on m
jingham added a comment.
Because of the mysteries of MIG, all the flavors of catch_exception_raise have
to be defined, but you register for a particular flavor when you set the task
exception ports. This isn't the flavor we register. So this function is
necessary but never used.
https://rev
davide added a comment.
I'm not particularly worried about testing double-free behavior, FWIW.
Ideally we should, but, I really understand it's a PITA. I think we might get
this for free when testing msan/asan (or just running under valgrind), assuming
there was already coverage for this path.
(
jingham added a comment.
Yes, this is one of the required MIG functions, but it isn't the flavor we
register to receive callbacks on (we pass EXCEPTION_DEFAULT to
task_set_exception_ports), so this function should never get called. That
makes it doubly hard to test!
https://reviews.llvm.org/
friss created this revision.
friss added a reviewer: jasonmolenda.
When a MIG routine returns KERN_FAILURE, the demux function will release any
OOL resources like ports. In this case, task_port and thread_port will be
released twice, potentially resulting in use after free of the ports.
I don't