sievec core dumps when hitting 'address' or 'envelope'

Michael Loftis mloftis at
Mon Aug 30 01:22:15 EDT 2004

Probably has to do with 64 bit alignment and pointers versus 32 bit 
alignment and pointers.  by reordering the int/pointer pair the union 
becomes not so much a union in the sense that may be meant for it.  didn't 
look into it deeply at all myself, but it would ppear that the machine 
code/variable space for each of the compiled versions of those mis-ordered 
unions is quite different on 64 bit platforms.

--On Monday, August 30, 2004 00:42 -0400 Scott Adkins <adkinss at> 

> We ran into a problem on Tru64 where the sieve compiler was core dumping
> if it tried to compile a script that used 'address' or 'envelope' in it.
> For example, the following script would core dump sievec:
>   if address :contains "To" "jshmoe at" {
>       stop;
>   }
> Changing 'address' to 'header' would work just fine.
> I tracked it down to a header file, tree.h.  Basically, there is a union
> defined inside the 'Test' structure that itself defines a few structures
> that would share the same memory space (so to speak... if you understand
> C programming, then you should understand what unions are).  The problem
> is that two of the structures defined many of the same variables as each
> other, but in different orders...
> For example, the first structure in the union declares A, B, then C, but
> the second structure in the union declares A, C, then B.
> This shouldn't normally be a problem, but on Tru64 5.x, it certainly is.
> I am not sure if it is a weirdness with 'cc', or if it is something
> deeper.
> The code compiles and without warnings, but it core dumps at runtime.
> Simply changing the order in one structure or the other to match solves
> the problem nicely.
> This could very well be related to the following bug:
>   <>
> I submitted a patch, which I will include here, that should fix it.  It
> is a *very* small patch :)
> Scott
> --
>  +-----------------------------------------------------------------------+
>       Scott W. Adkins      
>    UNIX Systems Engineer                  mailto:adkinss at
>         ICQ 7626282                 Work (740)593-9478 Fax (740)593-1944
>  +-----------------------------------------------------------------------+
>      PGP Public Key available at

Undocumented Features quote of the moment...
"It's not the one bullet with your name on it that you
have to worry about; it's the twenty thousand-odd rounds
labeled `occupant.'"
   --Murphy's Laws of Combat

Cyrus Home Page:
Cyrus Wiki/FAQ:
List Archives/Info:

More information about the Info-cyrus mailing list