GNU bug report logs - #41242
Port feature/native-comp to Windows

Previous Next

Package: emacs;

Reported by: Nicolas Bértolo <nicolasbertolo <at> gmail.com>

Date: Wed, 13 May 2020 19:28:01 UTC

Severity: wishlist

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Bértolo <nicolasbertolo <at> gmail.com>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: 41242 <at> debbugs.gnu.org
Subject: bug#41242: Port feature/native-comp to Windows - Determine the emacs root dir...
Date: Sat, 30 May 2020 10:23:55 -0300
[Message part 1 (text/plain, inline)]
I have found a few bugs in Windows.
Patches attached (they are in my repo too).

- It is still a good idea to avoid the call to getenv("emacs_dir"), if only for
  performance reasons.

- We can't use "gensym" for register_native_comp_unit() because the dynamic
  library may not have been loaded yet when loading a dump file.

- Commit `f5dceed09a8234548d5b3acb76d443569533cab9` "* lisp/loadup.el: Use new
  'native-comp-available-p'." causes load_gccjit_if_necessary() to be called in
  temacs. This didn't work because because term/w32-win.el had not been loaded
  yet. In particular, we need `dynamic-library-alist` to be defined to know the
  name of the libgccjit DLL. I have defined this in syms_of_emacs(). This
  definition should be active only while dumping.

- This last bug is kinda confusing. I'm not sure about my diagnosis. The list
  `delayed_comp_unit_disposal_list` has nodes allocated with xmalloc(). It seems
  that these blocks allocated with xmalloc() get GC'd or they get corrupted
  somehow and thus they don't survive until Emacs is about to close, which is
  when we need the list. I solved it by allocating the data and nodes with
  HeapAlloc().

Thanks, Nico.
[0001-Determine-the-emacs-root-dir-only-when-necessary.patch (application/octet-stream, attachment)]
[0002-Do-not-call-gensym-too-early-when-loading-a-dump-fil.patch (application/octet-stream, attachment)]
[0003-Fix-loading-of-libgccjit.dll-while-dumping-in-Window.patch (application/octet-stream, attachment)]
[0004-Use-Windows-allocation-APIs-for-delayed_comp_unit_di.patch (application/octet-stream, attachment)]

This bug report was last modified 5 years and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.