takuya kodama

Results 124 comments of takuya kodama

There is no `no-sanitize=alignment` option in GCC. - https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fno-sanitize_003dall In clang, there is this option. - https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#usage

I tried to build Groonga using clang with these options. I faced the follwoing build errors. ```bash rm -rf ../groonga.ubsan && \ cmake \ -S . \ -B ../groonga.ubsan \...

I will check whether these symbols exists or not in clang. ``` clang --version Ubuntu clang version 14.0.0-1ubuntu1.1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin ``` ``` ls /usr/lib/clang/14.0.0/lib/linux/ |...

We could build Groonga with UBSAN as follows ``` rm -rf ../groonga.ubsan && \ cmake \ -S . \ -B ../groonga.ubsan \ --preset=debug-default \ -DCMAKE_INSTALL_PREFIX=/tmp/local \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \...

It seems that UBSAN isn't enabled. ``` nm /tmp/local/lib/libgroonga.so | grep __ubsan ``` ``` nm /tmp/local/bin/groonga | grep __ubsan ``` I upgrade the clang to 19. And it seems that...

~~I will debug this Groonga process using GDB.~~ I couldn't do the above way.... ``` rm -rf ../groonga.ubsan && \ cmake \ -S . \ -B ../groonga.ubsan \ --preset=debug-default \...

``` sudo gdb --pid=2313934 (gdb) bt #0 0x00005b7399b0c792 in __sanitizer::GetHandleSignalMode(int) () #1 0x00005b7399b28881 in sigaction () #2 0x00005b7399b16889 in __sanitizer::MaybeInstallSigaction(int, void (*)(int, void*, void*)) () #3 0x00005b7399b167e3 in __sanitizer::InstallDeadlySignalHandlers(void (*)(int,...

Using incus, it works so it might be some problems in my local. ``` incus launch images:ubuntu/noble noble incus config device add noble host-rw disk shift=true source=$PWD path=/host-rw incus exec...

I will try to run the CI which enables UBSAN here. https://github.com/otegami/groonga/pull/13

```ruby cat filter_ubsan_errors.rb #!/usr/bin/env ruby require 'set' input = ARGF.read summaries = Set.new input.each_line do |line| if line =~ %r{^SUMMARY:.*(/[\w/\.-]+\.c:\d+:\d+)} summaries