<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 --- - invalid prompt in AbbreviationsTestCase.test_nonrunning_command_abbreviations test - apparent thread race condition"
   href="http://llvm.org/bugs/show_bug.cgi?id=22611">22611</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>invalid prompt in AbbreviationsTestCase.test_nonrunning_command_abbreviations test - apparent thread race condition
          </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>Looking at test failures on FreeBSD I came across one relating to prompt
setting.

Found by:

dotest.py --executable /data/emaste/src/llvm/build/bin/lldb -C /usr/bin/clang
-v -t -f AbbreviationsTestCase.test_nonrunning_command_abbreviations

which produced the following:
...
(lldb) settings set prompt "[with-three-trailing-spaces]   "
runCmd: com sou ./change_prompt.lldb
output: 

runCmd: settings show prompt
output: prompt (string) =
"\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645\037777777645"

Expecting start string: prompt (string) = "[with-three-trailing-spaces]   "
Not matched

While trying to reproduce this manually I found that short prompts generally
work, but longer prompts fail:

(lldb) settings set prompt "1234567890123456789012"
1234567890123456789012settings set prompt "12345678901234567890123"
¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥

On FreeBSD-11 (the development branch) malloc has "opt.junk" enabled by
default, which fills uninitialized allocated memory with 0xa5 and deallocated
memory with 0x5a; the ¥ character is 0xa5.</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>