[Lldb-commits] AdvDataFormatterTestCase relies on zeroed memory to pass

Ed Maste emaste at freebsd.org
Tue Jun 25 10:06:44 PDT 2013


To see if there's a common set of root causes for test failures on
FreeBSD I took a quick look at a sample of failing test cases.  One
that I happened to look at, which doesn't have a common failure cause,
is AdvDataFormatterTestCase.

It relies on a zeroed stack to pass. My FreeBSD desktop runs with
memory diagnostics enabled, so memory is filled with 0xa5 by default.
Running the command from the test case gives me:

(lldb) frame variable couple
(Couple) couple = {
  sp = {
    x = 0x0000000801808098
    y = 0x000000080180809c
    z = 0x0000000801809104 "X\xa53\xa56\xa59\xa5"
  }
  s = 0x0000000801807050

and if I turn off the memory diagnostics, I get:

(lldb) frame variable couple
(Couple) couple = {
  sp = {
    x = 0x0000000801808098
    y = 0x000000080180809c
    z = 0x0000000801809104 "X"
  }
  s = 0x0000000801807050

We could change main.cpp to avoid this, but it is a case
representative of real debugging experience, so I'm tempted to just
drop the final " from the match string:

-            substrs = ['(Couple) couple =  {','sp = {','z =','"X"'])
+            substrs = ['(Couple) couple =  {','sp = {','z =','"X'])

Seem reasonable?



More information about the lldb-commits mailing list