commit | 8a26172a9bfc4f13a0863e2a79e45f7887c93045 | [log] [tgz] |
---|---|---|
author | Devin Jeanpierre <jeanpierreda@google.com> | Thu Jan 12 14:04:05 2023 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Jan 12 14:04:44 2023 -0800 |
tree | f679126a398c3595e9e0f9960165802e274064a7 | |
parent | 933a69b0575715a265f94bfd2aa85a96c3337950 [diff] |
Fix the broken hash implementation for Crubit strong strings. Warnings were disabled, and so it was not a compilation error to forget to return from a function. Instead, we get undefined behavior -- in my particular case, the instruction pointer fell off the end of the function and hit the padding, which consisted of an instruction that emitted a `SIGTRAP`. Surprisingly frustrating to debug such a minor problem, but I've re-enabled warnings in a separate CL. Huge thanks to Richard Smith and Thomas Köppe, who helped me find the bug even though I asked in the wrong channel (oops). PiperOrigin-RevId: 501661323
Extremely experimental interop tooling for C++ and Rust.
Please don‘t use, this is an experiment and we don’t yet know where will it take us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.
$ apt install clang lld bazel $ git clone git@github.com:google/crubit.git $ cd crubit $ bazel build --linkopt=-fuse-ld=/usr/bin/ld.lld //rs_bindings_from_cc:rs_bindings_from_cc_impl
$ git clone https://github.com/llvm/llvm-project $ cd llvm-project $ CC=clang CXX=clang++ cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS='clang' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install $ cmake --build build -j $ # wait... $ cmake --install build $ cd ../crubit $ LLVM_INSTALL_PATH=../llvm-project/install bazel build //rs_bindings_from_cc:rs_bindings_from_cc_impl