https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117047

--- Comment #14 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
FWIW I tried again building emacs (from git) with gcc trunk with
--with-native-compilation=aot on x86_64 and, annoyingly, "make" completed
successfully; I see lots of
   ./native-lisp/31.0.50-677d9325/*.eln 
which are "ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), statically
linked, not stripped"

So I tried "make clean" and hacked up lisp/Makefile to have:

  # The actual Emacs command run in the targets below.
  emacs = valgrind '$(EMACS)' $(EMACSOPT)

to try to run all of emacs in the compilation under valgrind.

I'm seeing huge numbers of valgrind issues within Emacs, many within its own
garbage collector e.g.:

==4122183== Conditional jump or move depends on uninitialised value(s)
==4122183==    at 0x5D219D: pdumper_find_object_type_impl (pdumper.c:5287)
==4122183==    by 0x5CA8FB: pdumper_find_object_type (pdumper.h:200)
==4122183==    by 0x5CA8FB: mark_maybe_pointer (alloc.c:5028)
==4122183==    by 0x5CABA1: mark_memory (alloc.c:5170)
==4122183==    by 0x5CABA1: mark_c_stack (alloc.c:5353)
==4122183==    by 0x675278: mark_one_thread (thread.c:670)
==4122183==    by 0x675278: mark_threads_callback (thread.c:703)
==4122183==    by 0x67617C: flush_stack_call_func (lisp.h:4463)
==4122183==    by 0x67617C: mark_threads (thread.c:710)
==4122183==    by 0x5C918F: garbage_collect (alloc.c:6004)
==4122183==    by 0x5EE1B0: maybe_gc (lisp.h:5866)
==4122183==    by 0x5EE1B0: eval_sub (eval.c:2479)
==4122183==    by 0x61F65C: readevalloop (lread.c:2542)
==4122183==    by 0x620235: Fload (lread.c:1730)
==4122183==    by 0x620602: save_match_data_load (lread.c:1782)
==4122183==    by 0x5EC495: load_with_autoload_queue (eval.c:2359)
==4122183==    by 0x5FFE6F: Frequire (fns.c:3807)
==4122183== 
==4122183== Use of uninitialised value of size 8
==4122183==    at 0x5D21C0: dump_bitset_bit_set_p (pdumper.c:5126)
==4122183==    by 0x5D21C0: pdumper_find_object_type_impl (pdumper.c:5288)
==4122183==    by 0x5CA8FB: pdumper_find_object_type (pdumper.h:200)
==4122183==    by 0x5CA8FB: mark_maybe_pointer (alloc.c:5028)
==4122183==    by 0x5CABA1: mark_memory (alloc.c:5170)
==4122183==    by 0x5CABA1: mark_c_stack (alloc.c:5353)
==4122183==    by 0x675278: mark_one_thread (thread.c:670)
==4122183==    by 0x675278: mark_threads_callback (thread.c:703)
==4122183==    by 0x67617C: flush_stack_call_func (lisp.h:4463)
==4122183==    by 0x67617C: mark_threads (thread.c:710)
==4122183==    by 0x5C918F: garbage_collect (alloc.c:6004)
==4122183==    by 0x5EE1B0: maybe_gc (lisp.h:5866)
==4122183==    by 0x5EE1B0: eval_sub (eval.c:2479)
==4122183==    by 0x61F65C: readevalloop (lread.c:2542)
==4122183==    by 0x620235: Fload (lread.c:1730)
==4122183==    by 0x620602: save_match_data_load (lread.c:1782)
==4122183==    by 0x5EC495: load_with_autoload_queue (eval.c:2359)
==4122183==    by 0x5FFE6F: Frequire (fns.c:3807)

It's still building...

How clean is Emacs under valgrind normally?

Reply via email to