[#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:106886] [Ruby master Bug#18446] LSAN reporting
From:
"ibylich (Ilya Bylich)" <noreply@...>
Date:
2021-12-29 00:55:32 UTC
List:
ruby-core #106886
Issue #18446 has been updated by ibylich (Ilya Bylich). Is there any chance that it could be implemented behind a CLI flag? Something like `ruby --cleanup-at-shutdown`? As I understand this flag would require every new field that is added to C structs to be tested against this flag. There can objects that are allocated and freed at runtime, and so there must be existing `free_<type>` functions for them, it's not a problem to call them. Are there things that are created but never freed? Implementing and maintaining `free_*` functions for these guys slows down development of the "default path" of Ruby execution that doesn't even need them. Is it worth it? ---------------------------------------- Bug #18446: LSAN reporting https://bugs.ruby-lang.org/issues/18446#change-95692 * 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>