<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - FreeBSD test test_step_single_thread_with_dwarf (TestThreadStepOut.ThreadStepOutTestCase) fails as process does not exit"
   href="http://llvm.org/bugs/show_bug.cgi?id=18066">18066</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FreeBSD test test_step_single_thread_with_dwarf (TestThreadStepOut.ThreadStepOutTestCase) fails as process does not exit
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>emaste@freebsd.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This test fails on the assertion
        # At this point, the inferior process should have exited.               
        self.assertTrue(self.inferior_process.GetState() == lldb.eStateExited,
PROCESS_EXITED)

output:
runCmd: thread list
output: Process 84775 stopped
* thread #2: tid = 102403, 0x00000000004008a3
a.out`thread_func(input=0x0000000000000000) + 323 at main.cpp:43, stop reason =
step out
  thread #3: tid = 101935, 0x0000000000400744 a.out`step_out_of_here() + 4 at
main.cpp:33, stop reason = breakpoint 1.1
  thread #1: tid = 103003, 0x000000080082a4dc libthr.so.3 at _umtx_op_err.S:37


Expecting sub string: * thread #2
Matched

runCmd: thread backtrace all
output: * thread #2: tid = 102403, 0x00000000004008a3
a.out`thread_func(input=0x0000000000000000) + 323 at main.cpp:43, stop reason =
step out
  * frame #0: 0x00000000004008a3 a.out`thread_func(input=0x0000000000000000) +
323 at main.cpp:43
    frame #1: 0x0000000800822d34
libthr.so.3`thread_start(curthread=0x0000000801807c00) + 260 at
thr_create.c:284

  thread #3: tid = 101935, 0x0000000000400744 a.out`step_out_of_here() + 4 at
main.cpp:33, stop reason = breakpoint 1.1
    frame #0: 0x0000000000400744 a.out`step_out_of_here() + 4 at main.cpp:33
    frame #1: 0x00000000004008a3 a.out`thread_func(input=0x0000000000000000) +
323 at main.cpp:43
    frame #2: 0x0000000800822d34
libthr.so.3`thread_start(curthread=0x0000000801807800) + 260 at
thr_create.c:284

  thread #1: tid = 103003, 0x000000080082a4dc libthr.so.3 at _umtx_op_err.S:37
    frame #0: 0x000000080082a4dc libthr.so.3 at _umtx_op_err.S:37


Expecting sub string: main.cpp:43
Matched

Expecting sub string: main.cpp:33
Matched

runCmd: continue
output: Process 84775 resuming
Process 84775 stopped


FAILURE




Running the commands manually shows that the inferior stops again with stop
reason = trace, rather then exiting.

(lldb) thread step-out -m this-thread
Process 84825 stopped
* thread #2: tid = 103032, 0x00000000004008a3
a.out`thread_func(input=0x0000000000000000) + 323 at main.cpp:43, stop reason =
step out
    frame #0: 0x00000000004008a3 a.out`thread_func(input=0x0000000000000000) +
323 at main.cpp:43
   40       pseudo_barrier_wait(g_barrier);
   41  
   42       // Do something
-> 43       step_out_of_here(); // Expect to stop here after step-out (clang)
   44  
   45       // Return
   46       return NULL;  // Expect to stop here after step-out (icc and gcc)
  thread #3: tid = 103013, 0x0000000000400744 a.out`step_out_of_here() + 4 at
main.cpp:33, stop reason = breakpoint 1.1
    frame #0: 0x0000000000400744 a.out`step_out_of_here() + 4 at main.cpp:33
   30   volatile int g_test = 0;
   31  
   32   void step_out_of_here() {
-> 33     g_test += 5; // Set breakpoint here
   34   }
   35  
   36   void *
(lldb) c
Process 84825 resuming
Process 84825 stopped
* thread #2: tid = 103032, 0x00000000004008ad
a.out`thread_func(input=0x0000000000000000) + 333 at main.cpp:46, stop reason =
trace
    frame #0: 0x00000000004008ad a.out`thread_func(input=0x0000000000000000) +
333 at main.cpp:46
   43       step_out_of_here(); // Expect to stop here after step-out (clang)
   44  
   45       // Return
-> 46       return NULL;  // Expect to stop here after step-out (icc and gcc)
   47   }
   48  
   49   int main ()</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>