7687 mdb dcmds fail in CTF lookup after #3467

Review Request #304 — Created Dec. 23, 2016 and submitted


7687 mdb dcmds fail in CTF lookup after #3467

Used the smbsrv dmod that tripped over this problem.

  1. I think this looks good. But you may want to double check how this interacts with the gc that goes on when someone issues a ctrl+c in a pipeline. I think because this is on the stack we won't leak it and it'll be fine.
    1. BTW, I verified the ctrl-C with a pipeline cleans up OK.
      Will try to get this ready for RTI.

  1. Can the mdb_call() function be also affected due to it calls mdb_call_idcmd() in the loop?

    What if just improve generic mdb_call_idcmd() function by adding check like this ?:

    if (mdb.m_frame->f_cp && mdb.m_frame->f_cp->c_dcmd && mdb.m_frame->f_cp->c_dcmd != idcp) {
    ... // save and set new context


    ... // restore context at the end ...

    1. That was actually my first approach, but then I found:
      - mdb_call already has a proper mdb.m_frame->f_cp filled in
      - The f_cp there already has the correct module.

      So I decided it was unnecessary to change that call site of
      mdb_call_idcmd, and a little easier to modify the other two
      calls sites to setup a correct ->f_cp instead.

Review request changed

Status: Closed (submitted)