[Lldb-commits] [lldb] r325927 - Replace HashStringUsingDJB with llvm::djbHash

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 7 17:43:17 PST 2018

On Fri, Feb 23, 2018 at 9:49 AM, Pavel Labath via lldb-commits
<lldb-commits at lists.llvm.org> wrote:
> Author: labath
> Date: Fri Feb 23 09:49:26 2018
> New Revision: 325927
> URL: http://llvm.org/viewvc/llvm-project?rev=325927&view=rev
> Log:
> Replace HashStringUsingDJB with llvm::djbHash
> Summary:
> The llvm function is equivalent to this one. Where possible I tried to
> replace const char* with llvm::StringRef to avoid extra strlen
> computations. In most places, I was able to track the c string back to
> the ConstString it was created from.
> I also create a test that verifies we are able to lookup names with
> unicode characters, as a bug in the llvm compiler (it accidentally used
> a different hash function) meant this was not working until recently.
> This also removes the unused ExportTable class.
> Reviewers: aprantl, davide

The unicode test that you added fails for me (and others here) locally on MacOS.

Session logs for test failures/errors/unexpected successes will go
into directory '/Users/davide/work/llvm-monorepo/build/lldb-test-traces'
Command invoked:
-q --arch=x86_64 --executable
/Users/davide/work/llvm-monorepo/build/bin/lldb -s
/Users/davide/work/llvm-monorepo/build/lldb-test-traces --build-dir
/Users/davide/work/llvm-monorepo/build/lldb-test-build.noindex -S nm
/Users/davide/work/llvm-monorepo/build/./bin/clang --codesign-identity
lldb_codesign --server
/Users/davide/work/llvm-monorepo/build/bin/debugserver --results-port
51468 -S nm --inferior -p TestUnicodeSymbols.py
--event-add-entries worker_index=15:int
FAIL: LLDB (/Users/davide/work/llvm-monorepo/build/bin/clang-7.0-x86_64)
:: test_union_members_dsym (TestUnicodeSymbols.TestUnicodeSymbols)
PASS: LLDB (/Users/davide/work/llvm-monorepo/build/bin/clang-7.0-x86_64)
:: test_union_members_dwarf (TestUnicodeSymbols.TestUnicodeSymbols)
PASS: LLDB (/Users/davide/work/llvm-monorepo/build/bin/clang-7.0-x86_64)
:: test_union_members_gmodules (TestUnicodeSymbols.TestUnicodeSymbols)
FAIL: test_union_members_dsym (TestUnicodeSymbols.TestUnicodeSymbols)
Traceback (most recent call last):
 File "/Users/davide/work/llvm-monorepo/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 1769, in dsym_test_method
   return attrvalue(self)
 File "/Users/davide/work/llvm-monorepo/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lang/c/unicode/TestUnicodeSymbols.py",
line 18, in test_union_members
AssertionError: False is not True
Ran 3 tests in 2.715s

RESULT: FAILED (2 passes, 1 failures, 0 errors, 0 skipped, 0 expected
failures, 0 unexpected successes)

[TestUnicodeSymbols.py FAILED]

Any chance that you can take a look?
It's a little weird because only the dsym version is actually failing.



More information about the lldb-commits mailing list