The following patch will work around the issue:
(See attached file: function.c.patch)

Hubert S K Tong
IBM Canada Ltd, C2/YGH/8200/MKM
8200 Warden Ave, Markham ON L6G 1C7
Canada
E-mail: hstong@ca.ibm.com

Inactive hide details for Hubert Tong---29-03-2012 07:03:51 PM---Hi Steven, I was able to reorder the source file (by adding foHubert Tong---29-03-2012 07:03:51 PM---Hi Steven, I was able to reorder the source file (by adding forward declarations for the

From: Hubert Tong/Toronto/IBM
To: steven@providere-consulting.com, "Boost.Build developer's and user's list" <boost-build@lists.boost.org>
Cc: "Boost.Build developer's and user's list" <boost-build@lists.boost.org>, boost-build-bounces@lists.boost.org
Date: 29-03-2012 07:03 PM
Subject: Re: [Boost-build] [EXTERNAL] Re: Boost build vacpp on Linux (PPC)




Hi Steven,

I was able to reorder the source file (by adding forward declarations for the
functions and pulling the type definitions up) to get a version which works.

The following stores are missing in the broken version:

2999 result = arg_compile_impl( c, parse->file, parse->line );
...
3021 struct arg_list args = arg_compile( parse );
...
3076 arg = arg_compile_impl( arg_comp, constant_builtin, -1 );

in arg_compile:
store into "result" after call to "arg_compile_impl"
in argument_list_compiler_add:
store into "args" after call to "arg_compile"
in arg_list_compile_builtin:
store into "arg" after call to "arg_compile_impl"

I will report this to the compiler team responsible.

Thanks for the help.

Sincerely,


Hubert Tong

Hubert S K Tong
IBM Canada Ltd, C2/YGH/8200/MKM
8200 Warden Ave, Markham ON L6G 1C7
Canada
E-mail: hstong@ca.ibm.com


Inactive hide details for Steven Watanabe ---29-03-2012 11:19:15 AM---AMDG On 03/28/2012 10:31 PM, Hubert Tong wrote:Steven Watanabe ---29-03-2012 11:19:15 AM---AMDG On 03/28/2012 10:31 PM, Hubert Tong wrote:

From: Steven Watanabe <watanabesj@gmail.com>
To: "Boost.Build developer's and user's list" <boost-build@lists.boost.org>
Date: 29-03-2012 11:19 AM
Subject: Re: [Boost-build] [EXTERNAL] Re: Boost build vacpp on Linux (PPC)
Sent by: boost-build-bounces@lists.boost.org




AMDG

On 03/28/2012 10:31 PM, Hubert Tong wrote:
>
> I have confirmed that compiling function.c with optimization is the key to
> hitting the issue.
> It seems argv/envp can affect how the failure presents itself.
>
> Using xlc option -qinitauto=00 (which will zero otherwise uninitialized
> stack variables), I can get:
>> bin.aixppc/b2 --help
> jambase.c:76: in module scope
> *** argument error
> * rule find-to-root (  :  )
> * called with:
> ( /home/hstong/b2011/boost-trunk-2012-03-25-12-03-24-EDT/tools/build/v2/engine :
>  boost-build.jam )
> * extra
> argument /home/hstong/b2011/boost-trunk-2012-03-25-12-03-24-EDT/tools/build/v2/engine
> jambase.c:11:see definition of rule 'find-to-root' being called
> Return:  0x01:1
>

Okay. So I was off-by-one on the line number.
The problem appears to be either in arg_list_compile
or in argument_list_push.

A few more things that would help:

a) The output with the attached patch
  (There may be a lot.  I only need the output for
  find-to-root)

b) The output when run under valgrind --track-origins=yes

c) A mixed assembler/source dump for function.c.  (The
  problem is sufficiently isolated now that I should
  be able to track down the problem with only this.)

> Here is the debugger trace without -qinitauto=00 (I replaced struct _object
> with char to get better output):
> Segmentation fault in list_end at line 120 in file "lists.c"
>   120           return list_begin( l ) + l->impl.size;
> (dbx) where
> list_end(l = 0xdeadbeef), line 120 in "lists.c"
> type_check(type_name = "", values = (nil), caller = 0x00000020, called =
> 0x0000c128, arg_name = (nil)), line 2686 in "function.c"

So the stack is totally broken.  I really hope
that this is mostly a result of incorrect debug
info, because l in frame 0, should be the same
as values in frame 1.

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost-build