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
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"
unnamed block in argument_list_push(formal = 0x2ff21640, formal_count = 0, function = 0x2ff212a0, frame = (nil), s = 0xdeadbeef), line 2809 in "function.c"
unnamed block in argument_list_push(formal = 0x2ff21640, formal_count = 0, function = 0x2ff212a0, frame = (nil), s = 0xdeadbeef), line 2809 in "function.c"
argument_list_push(formal = 0x2ff21640, formal_count = 0, function = 0x2ff212a0, frame = (nil), s = 0xdeadbeef), line 2809 in "function.c"
function_run(function_ = 0x2000e0e0, frame = 0x200046e0, s = 0x2ff214d0), line 3394 in "function.c"
unnamed block in evaluate_rule(rulename = "find-to-root", frame = 0x2ff21640), line 264 in "compile.c"
evaluate_rule(rulename = "find-to-root", frame = 0x2ff21640), line 264 in "compile.c"
function_call_rule(function = 0x2000e0e0, frame = 0x2000c128, s = 0x2ff21740, n_args = -265522048, unexpanded = "\200A", file = (nil), line = 22), line 451 in "function.c"
function_run(function_ = 0x2007f888, frame = 0x10030b24, s = 0x10030b54), line 3938 in "function.c"
unnamed block in parse_file(f = "+", frame = 0x2ff22248), line 57 in "parse.c"
parse_file(f = "+", frame = 0x2ff22248), line 57 in "parse.c"
unnamed block in main(argc = 0, argv = 0x2ff22418, arg_environ = 0x2ff2241c), line 542 in "jam.c"
unnamed block in main(argc = 0, argv = 0x2ff22418, arg_environ = 0x2ff2241c), line 542 in "jam.c"
main(argc = 0, argv = 0x2ff22418, arg_environ = 0x2ff2241c), line 542 in "jam.c"
(dbx) frame 8
function_call_rule(function = 0x2000e0e0, frame = 0x2000c128, s = 0x2ff21740, n_args = -265522048, unexpanded = "\200A", file = (nil), line = 22), line 451 in "function.c"
(dbx) print *function
(base = (type = 1718185572, reference_count = 762605357, rulename = (invalid char ptr (0x726f6f74)), formal_arguments = (nil), num_formal_arguments = 1684644916), code_size = 0, code = 0x64697200, num_constants = 61487419, constants = (nil), num_subfunctions = 1735159650, functions = 0x73000000, num_subactions = 1569788835, actions = 0x20007744, generic = 0x24286469, file = (invalid char ptr (0x72290000)), line = -1411044943)
(dbx)
Thanks,
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
Steven Watanabe ---28-03-2012 09:55:49 PM---AMDG On 03/28/2012 02:33 PM, Belcourt, K. Noel wrote:
From: Steven Watanabe <watanabesj@gmail.com>
To: "Boost.Build developer's and user's list" <boost-build@lists.boost.org>
Date: 28-03-2012 09:55 PM
Subject: Re: [Boost-build] [EXTERNAL] Re: Boost build vacpp on Linux (PPC)
Sent by: boost-build-bounces@lists.boost.org