emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preview: portable dumper


From: Stefan Monnier
Subject: Re: Preview: portable dumper
Date: Wed, 14 Feb 2018 23:28:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I've pushed the portable dumper to the pdumper Savannah branch. It should
> support a fully PIC Emacs.

Thank you very much Daniel.  I hope this can move to master soon.
I just tried it (on Debian testing, with the latest commit at the time,
i.e. 5232a17c365f871a84603caba81712415a260042) and here's my experience:

- compilation fails with

    In file included from character.h:27:0,
                     from buffer.h:27,
                     from pdumper.c:18:
    pdumper.c: In function ‘intmax_t_to_lisp’:
    pdumper.c:699:29: error: conversion to ‘EMACS_INT {aka int}’ from ‘intmax_t 
{aka long long int}’ may alter its value [-Werror=conversion]
         return INTEGER_TO_CONS (value);  \
                                 ^
    lisp.h:3572:19: note: in definition of macro ‘INTEGER_TO_CONS’
        ? make_number (i)          \
                       ^
    pdumper.c:703:1: note: in expansion of macro ‘DEFINE_TOLISP_FUNC’
     DEFINE_TOLISP_FUNC (intmax_t_to_lisp, intmax_t);
     ^~~~~~~~~~~~~~~~~~
    pdumper.c: In function ‘pdumper_load’:
    pdumper.c:5049:14: error: conversion to ‘unsigned int’ from ‘off_t {aka 
long long int}’ may alter its value [-Werror=conversion]
          .size = dump_size - header->cold_start,
                  ^~~~~~~~~
    pdumper.c:5072:21: error: conversion to ‘intptr_t {aka int}’ from ‘off_t 
{aka long long int}’ may alter its value [-Werror=conversion]
       dump_public.end = dump_public.start + dump_size;
                         ^~~~~~~~~~~
    In file included from character.h:27:0,
                     from buffer.h:27,
                     from pdumper.c:18:

  I fixed those with the patch below, but it seems there's some issues
  with off_t vs size_t (I guess a dump file shouldn't be bigger than the
  available address space, so even though the max size of files can be
  much bigger, we can use smaller integers to refer to size&position
  within dump files).

- after that the dump itself crashed as follows:

    pdumper.c:2468: Emacs fatal error: assertion failed: vector_nbytes ((struct 
Lisp_Vector *) in) == out_size

  Backtrace below.


        Stefan


Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name bootstrap-emacs.pdmp
dumping fingerprint: 
d003f05f220e1040ec992fccec03d65c4934d9181cbde233f17892969593f435

pdumper.c:2468: Emacs fatal error: assertion failed: vector_nbytes ((struct 
Lisp_Vector *) in) == out_size

Thread 1 "temacs" hit Breakpoint 1, terminate_due_to_signal (sig=6, 
    backtrace_limit=2147483647) at emacs.c:357
(gdb) bt
#0  0x08194a5a in terminate_due_to_signal (sig=6, backtrace_limit=2147483647)
    at emacs.c:357
#1  0x08216a9e in die (msg=0x833c654 "vector_nbytes ((struct Lisp_Vector *) in) 
== out_size", file=0x833b6f8 "pdumper.c", line=2468) at alloc.c:7796
#2  0x08227321 in dump_object_start_pseudovector (address@hidden, 
address@hidden, address@hidden, in_hdr=0xbfffe948)
    at pdumper.c:2468
#3  0x082284d0 in dump_buffer (ctx=0xbfffec08, in_buffer=0x8718d20)
    at pdumper.c:2632
#4  0x08228be1 in dump_vectorlike (address@hidden, v=0x8718d20)
    at pdumper.c:2825
#5  0x08228dc1 in dump_object_1 (address@hidden, address@hidden(0x8718d25)) at 
pdumper.c:2889
#6  0x08228f2e in dump_object (address@hidden, object=XIL(0x8718d25)) at 
pdumper.c:2954
#7  0x0822981f in Fdump_emacs_portable (filename=XIL(0x922ce54), 
track_referrers=XIL(0)) at pdumper.c:3780
#8  0x08251349 in eval_sub (form=...) at eval.c:2290
#9  0x08252337 in Fif (args=XIL(0x88f13db)) at eval.c:414
#10 0x08250ff4 in eval_sub (form=...) at eval.c:2239
#11 0x082518e9 in Fprogn (body=...) at eval.c:459
#12 0x08253ef5 in Flet (args=XIL(0x88b029b)) at eval.c:973
#13 0x08250ff4 in eval_sub (form=...) at eval.c:2239
#14 0x08252337 in Fif (args=XIL(0x87f975b)) at eval.c:414
#15 0x08250ff4 in eval_sub (form=...) at eval.c:2239
#16 0x08286d3c in readevalloop (readcharfun=XIL(0x34c8), address@hidden, 
sourcename=..., 
    address@hidden(0x873c434), printflag=false, unibyte=XIL(0), readfun=XIL(0), 
start=XIL(0), end=XIL(0)) at lread.c:2073
#17 0x08287cbc in Fload (file=XIL(0x8723644), noerror=XIL(0), nomessage=XIL(0), 
nosuffix=XIL(0), must_suffix=XIL(0)) at lread.c:1457
#18 0x082513c7 in eval_sub (form=...) at eval.c:2301
#19 0x0825450a in Feval (form=XIL(0x87128bb), lexical=XIL(0)) at eval.c:2107
#20 0x081992fe in top_level_2 () at keyboard.c:1122
#21 0x0824c263 in internal_condition_case (bfun=0x81992c8 <top_level_2>, 
handlers=XIL(0x2988), hfun=0x819eb61 <cmd_error>) at eval.c:1336
#22 0x0819cbaf in top_level_1 (ignore=XIL(0)) at keyboard.c:1130
#23 0x0824c160 in internal_catch (tag=XIL(0x64e0), func=0x819caf0 
<top_level_1>, arg=XIL(0)) at eval.c:1101
#24 0x0819b8ef in command_loop () at keyboard.c:1091
#25 0x0819e233 in recursive_edit_1 () at keyboard.c:698
#26 0x0819e896 in Frecursive_edit () at keyboard.c:769
#27 0x08195aaa in main (argc=<optimized out>, argv=<optimized out>)
    at emacs.c:1915

Lisp Backtrace:
"dump-emacs-portable" (0xbfffed5c)
"if" (0xbfffee4c)
"let" (0xbfffef8c)
"if" (0xbffff05c)
"load" (0xbffff28c)
(gdb) 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]