Hi Tom.

The VisualAge compiler on IBM AIX seems very fickle. Argh!

The compiler will do the right thing with this:
        Str temp;
        if (physical)
        {
                temp = proc -> getAliasedName(name, currNamespaces);
                physical -> outputElementEnd(temp, 0);
        };

or this:
        if (physical)
        {
                Str temp;
                temp = proc -> getAliasedName(name, currNamespaces);
                physical -> outputElementEnd(temp, 0);
        };

but it SIGSEV's with this [roughly the preprocessor output of what you sent
me]:
        Str temp;
        if (physical)
        {
                physical -> outputElementEnd(temp = proc ->
getAliasedName(name, currNamespaces), 0);
        };


-----Original Message-----
From: Tom Kaiser [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 5:43 PM
To: Sablotron Mailing List
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Sab] Problem with OutputterObj::eventElementEnd on IBM
AIX...


Tim,

OK, let's use temporary variables for the result of every 
getAliasedName(). Would the following work?

           Str temp;
           IF_PH3( outputElementEnd,
                  temp = proc -> getAliasedName(name, currNamespaces),
                  NONEMPTY_ELEMENT );

Tom

Tim Crook wrote:

> In OutputterObj::eventElementEnd, under the case of STATE_IN_ELEMENT,
there
> is a problem with an anonymous stack Str variable being corrupted on IBM
> AIX.This results in a core dump. getAliasedName returns a Str, which is
> passed directly to outputElementEnd. The string is passed as a const Str &
> parameter to outputElementEnd. I believe the compiler is generating bad
> code, as this works pretty much everywhere else.
> 
> This problem can be eliminated if a temporary Str is explicitly allocated
> and then passed into outputElementEnd. As this code is hidden inside your
> IF_PH3 macro, I thought I should leave the modification of this code up to
> you.
> 
> This problem occurs with the XSL and XML files posted by Herman Walker on
> Feb. 19, 2001.
> 
> 

Reply via email to