[#106355] [Ruby master Bug#18373] RBS build failure: '/include/x86_64-linux/ruby/config.h', needed by 'constants.o'. — "vo.x (Vit Ondruch)" <noreply@...>
Issue #18373 has been reported by vo.x (Vit Ondruch).
28 messages
2021/12/01
[ruby-core:106882] [Ruby master Bug#18446] LSAN reporting
From:
"ibylich (Ilya Bylich)" <noreply@...>
Date:
2021-12-28 22:42:42 UTC
List:
ruby-core #106882
Issue #18446 has been updated by ibylich (Ilya Bylich). Thanks, I've seen this gem before. Unfortunately, Valgrind doesn't work on the latest MacOS (starting from Catalina? I don't remember), there are a few forks, but they were buggy and I couldn't find any that works on the current latest MacOS, so LSAN is the only thing I can use locally. Also, as I understand, it uses suppression files. I had the same idea with LSAN - https://github.com/lib-ruby-parser/ruby-bindings/blob/master/LSan.supp, but every time I added a new filter I wasn't sure if I'm doing the right thing. Would be great if it could be fixed directly in Ruby. ---------------------------------------- Bug #18446: LSAN reporting https://bugs.ruby-lang.org/issues/18446#change-95690 * Author: ibylich (Ilya Bylich) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.0dev (2021-12-27T13:57:46Z master be476f38f9) [x86_64-darwin20] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- ASAN ships with LSAN (LeakSANinitizer) that (if compiled with ASAN) can be enabled by adding `ASAN_OPTIONS=detect_leaks=1` env variable. As I know it can also be injected dynamically via `LD_PRELOAD`/`DYLD_INSERT_LIBRARIES` on Linux/Mac. Currently it reports a bunch of memory leaks of different sizes: ``` ... 1 kilometer of leaks ... SUMMARY: AddressSanitizer: 540806 byte(s) leaked in 11450 allocation(s). ``` First of all, are these leaks real? valgrind also reports them. If they are not real, is there a way to make LSAN ignore them? As I know MRI uses ASAN programmatically in many place (like in `gc.h`) to poison (i.e. "mark"?) some memory areas, and so my hunch is that these leaks are false-positive. Then, is it possible to "fix" reporting? I'm asking because it'd be very useful for native extensions development, ASAN+LSAN is a good combo to find and unroll segfaults and memory leaks, but LSAN is barely usable right now. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>