[Bug 22611] New: invalid prompt in AbbreviationsTestCase.test_nonrunning_command_abbreviations test - apparent thread race condition

Bug ID 22611
Summary invalid prompt in AbbreviationsTestCase.test_nonrunning_command_abbreviations test - apparent thread race condition
Product lldb
Version unspecified
Hardware PC
OS FreeBSD
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter emaste@freebsd.org
Classification Unclassified

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.

emaste@freebsd.org changed bug 22611

What | Removed | Added |

  • | - | - |
    Status | NEW | RESOLVED |
    Resolution | — | WORKSFORME |

Comment # 3 on bug 22611 from emaste@freebsd.org

Flakey decorator removed in r261266.