diff options
| author | Andrea Corallo | 2020-06-08 17:21:03 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-06-08 21:51:24 +0100 |
| commit | 4784bcc96b32f2fc796c7067d2a6c8ddf00f4242 (patch) | |
| tree | 84695bde1249f66c2b70c5aadef9ef21d3e2d2d0 /src/comp.c | |
| parent | 3d3737b90ab4dcded11ec716f92b9fa8a5c3fbeb (diff) | |
| download | emacs-4784bcc96b32f2fc796c7067d2a6c8ddf00f4242.tar.gz emacs-4784bcc96b32f2fc796c7067d2a6c8ddf00f4242.zip | |
* Fix load logic for the reloading CU case (bug#41754)
* src/comp.c (load_comp_unit): When swapping the compilation unit
abandoning the new one for the original do not forget to set its
loaded_once field to true because is in use by
`comp--register-lambda'.
(Fcomp__register_lambda): Add sanity a check to spot
early if we are trying to load the same lambda twice.
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c index b2dbfe88b3b..960badb6467 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -4439,6 +4439,7 @@ load_comp_unit (struct Lisp_Native_Comp_Unit *comp_u, bool loading_dump, | |||
| 4439 | { | 4439 | { |
| 4440 | comp_u_lisp_obj = *saved_cu; | 4440 | comp_u_lisp_obj = *saved_cu; |
| 4441 | comp_u = XNATIVE_COMP_UNIT (comp_u_lisp_obj); | 4441 | comp_u = XNATIVE_COMP_UNIT (comp_u_lisp_obj); |
| 4442 | comp_u->loaded_once = true; | ||
| 4442 | } | 4443 | } |
| 4443 | else | 4444 | else |
| 4444 | *saved_cu = comp_u_lisp_obj; | 4445 | *saved_cu = comp_u_lisp_obj; |
| @@ -4603,6 +4604,7 @@ DEFUN ("comp--register-lambda", Fcomp__register_lambda, Scomp__register_lambda, | |||
| 4603 | Fputhash (tem, Qt, cu->lambda_gc_guard); | 4604 | Fputhash (tem, Qt, cu->lambda_gc_guard); |
| 4604 | /* This is for fixing up the value in d_reloc while resurrecting | 4605 | /* This is for fixing up the value in d_reloc while resurrecting |
| 4605 | from dump. See 'dump_do_dump_relocation'. */ | 4606 | from dump. See 'dump_do_dump_relocation'. */ |
| 4607 | eassert (NILP (Fgethash (c_name, cu->lambda_c_name_idx_h, Qnil))); | ||
| 4606 | Fputhash (c_name, reloc_idx, cu->lambda_c_name_idx_h); | 4608 | Fputhash (c_name, reloc_idx, cu->lambda_c_name_idx_h); |
| 4607 | /* The key is not really important as long is the same as | 4609 | /* The key is not really important as long is the same as |
| 4608 | symbol_name so use c_name. */ | 4610 | symbol_name so use c_name. */ |