emacs-devel
[Top][All Lists]
Advanced

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

Write access to pure space in dumped executable


From: YAMAMOTO Mitsuharu
Subject: Write access to pure space in dumped executable
Date: Fri, 28 Jan 2011 17:21:19 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

I found a few types of write access to the pure space in the normal
execution of the dumped one:

1. pure_cons calls from init_process (process.c).

2. XSETCAR/XSETCDR in the CHECK_CHARACTER_CAR/CDR macros (character.h).

   What are these XSETCAR/XSETCDR for?

3. write access to empty_unibyte/multibyte_string (lisp.h, alloc.c)

   If the length of the string to be allocated is 0,
   make_uninit_string (or make_uninit_multibyte_string) returns
   empty_unibyte_string (or empty_multibyte_string, respectively),
   which is allocated in the pure space.  So,

   3.1. STRING_SET_UNIBYTE tries to write the `size_byte member' of
        struct Lisp_String when the arg STR is actually
        empty_unibyte_string.
   
   3.2. `*p = 0;' around the end of Fmake_string tries to write the
        string data of these empty strings if the arg LENGTH is 0.

                                     YAMAMOTO Mitsuharu
                                address@hidden



reply via email to

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