gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] dummy struct fields in object.h


From: Camm Maguire
Subject: Re: [Gcl-devel] dummy struct fields in object.h
Date: 11 May 2004 12:44:11 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  Nice creative thinking, Mike!

While it is not obvious from your post what the nature of the crash
is, my strong guess is that it is due to misaligning te various
structs in the lisp union.  st_self has to be at the same place as
v_self, a_self, ust_self....  These casts are used several places
within the code.  

Furthermore, you are overruning the memory *pointed to* by st_self,
not st_self itself.  This is by far most likely to be in the
relocatable area, but could possibly be in the heap.  Would be great
just to double check the address of st_self and heap_end at the point
of failure, if we can ever trap it.

Take care,

"Mike Thomas" <address@hidden> writes:

> Hi Camm.
> 
> I thought that the Windows Maxima "ignore-errors" bug might be caused by
> overwrites of the fill-pointer or other data in strings and/or pathnames, so
> inserted dummy fields in the relevant structs in "h/object.h" shown below.
> 
> This causes a clean build to abort early on when the raw_pre_gcl executable
> (if I recall correctly - I have a clean tree at the moment due to gcc 3.4
> experiments and blew away the log) starts up.  I sneaked a build one evening
> on one of our sacred Linux build machines and got the same result.
> 
> I am surprised that doing this to components of "lispunion" should cause
> such a problem.
> 
> Cheers
> 
> Mike Thomas.
> 
> 
> 
> 
> struct string {                       /*  string header  */
>               FIRSTWORD;
>         int dummy6;
>       object  st_displaced;   /*  displaced  */
>         int dummy0;
>       short   st_hasfillp;    /*  has-fill-pointer flag  */
>         int dummy1;
>       short   st_adjustable;  /*  adjustable flag  */
>         int dummy2;
>       char    *st_self;       /*  pointer to the string  */
>         int dummy3;
>       int     st_fillp;       /*  fill pointer  */
>                               /*  For simple strings,  */
>                               /*  st_fillp is equal to st_dim.  */
>         int dummy4;
>       int     st_dim;         /*  dimension  */
>                               /*  string length  */
>         int dummy5;
> 
> };
> 
> struct ustring {
>               FIRSTWORD;
>         int dummy7;
>       object  ust_displaced;
>         int dummy1;
>       short   ust_hasfillp;
>         int dummy2;
>       short   ust_adjustable;
>         int dummy3;
>       unsigned char *ust_self;
>         int dummy4;
>       int     ust_fillp;
>         int dummy5;
> 
>       int     ust_dim;
>         int dummy6;
> 
> 
> };
> 
> and
> 
> struct pathname {
>               FIRSTWORD;
>         int dummy7;
>       object  pn_host;        /*  host  */
>         int dummy1;
>       object  pn_device;      /*  device  */
>         int dummy2;
>       object  pn_directory;   /*  directory  */
>         int dummy3;
>       object  pn_name;        /*  name  */
>         int dummy4;
>       object  pn_type;        /*  type  */
>         int dummy5;
>       object  pn_version;     /*  version  */
>         int dummy6;
> };
> 
> 
> 
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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