Hi! I'm still working on bug: http://python.org/sf/1720241 First thing I've found is that `compile` works OK, but `compiler.parse` not. And I feel that It's bug in python, or python port, because I'm getting Bus error on some stage when I'm tracing execution and trying to backtrace. Also `parser.expr` passes ok, and error raises in Transformer class. I've attached part of the debugger session, and script I use. Any hints how to debug it further? -- Paul. (Pdb) bt /usr/local/lib/python2.5/threading.py(460)__bootstrap() -> self.run() /usr/local/lib/python2.5/threading.py(440)run() -> self.__target(*self.__args, **self.__kwargs) /tmp/test1.py(9)test() -> print Transformer().compile_node(b) /usr/local/lib/python2.5/compiler/transformer.py(160)compile_node() -> return self.eval_input(node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(195)eval_input() -> return Expression(self.com_node(nodelist[0])) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(602)and_test() -> return self.com_binary(And, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(606)not_test() -> result = self.com_node(nodelist[-1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(613)comparison() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(646)expr() -> return self.com_binary(Bitor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(650)xor_expr() -> return self.com_binary(Bitxor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(654)and_expr() -> return self.com_binary(Bitand, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(658)shift_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(670)arith_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(682)term() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(702)factor() -> node = self.lookup_node(nodelist[-1])(nodelist[-1][1:]) /usr/local/lib/python2.5/compiler/transformer.py(714)power() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(726)atom() -> return self._atom_dispatch[nodelist[0][0]](nodelist) /usr/local/lib/python2.5/compiler/transformer.py(731)atom_lpar() -> return self.com_node(nodelist[1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(577)testlist_gexp() -> return self.testlist(nodelist) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(602)and_test() -> return self.com_binary(And, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(606)not_test() -> result = self.com_node(nodelist[-1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(613)comparison() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(646)expr() -> return self.com_binary(Bitor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(650)xor_expr() -> return self.com_binary(Bitxor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(654)and_expr() -> return self.com_binary(Bitand, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(658)shift_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(670)arith_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(682)term() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(702)factor() -> node = self.lookup_node(nodelist[-1])(nodelist[-1][1:]) /usr/local/lib/python2.5/compiler/transformer.py(714)power() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(726)atom() -> return self._atom_dispatch[nodelist[0][0]](nodelist) /usr/local/lib/python2.5/compiler/transformer.py(731)atom_lpar() -> return self.com_node(nodelist[1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(577)testlist_gexp() -> return self.testlist(nodelist) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(602)and_test() -> return self.com_binary(And, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(606)not_test() -> result = self.com_node(nodelist[-1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(613)comparison() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(646)expr() -> return self.com_binary(Bitor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(650)xor_expr() -> return self.com_binary(Bitxor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(654)and_expr() -> return self.com_binary(Bitand, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(658)shift_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(670)arith_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(682)term() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(702)factor() -> node = self.lookup_node(nodelist[-1])(nodelist[-1][1:]) /usr/local/lib/python2.5/compiler/transformer.py(714)power() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(726)atom() -> return self._atom_dispatch[nodelist[0][0]](nodelist) /usr/local/lib/python2.5/compiler/transformer.py(731)atom_lpar() -> return self.com_node(nodelist[1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(577)testlist_gexp() -> return self.testlist(nodelist) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:])
/usr/local/lib/python2.5/compiler/transformer.py(579)test() -> def test(self, nodelist): (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(581)test() -> if len(nodelist) == 1 and nodelist[0][0] == symbol.lambdef: (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) (Pdb) s --Call-- /usr/local/lib/python2.5/compiler/transformer.py(787)com_node() -> def com_node(self, node): (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) (Pdb) s --Call-- /usr/local/lib/python2.5/compiler/transformer.py(593)or_test() -> def or_test(self, nodelist): (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(595)or_test() -> if len(nodelist) == 1 and nodelist[0][0] == symbol.lambdef: (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) (Pdb) s --Call-- /usr/local/lib/python2.5/compiler/transformer.py(1060)com_binary() -> def com_binary(self, constructor, nodelist): (Pdb) bt(Pdb) bt /usr/local/lib/python2.5/threading.py(460)__bootstrap() -> self.run() /usr/local/lib/python2.5/threading.py(440)run() -> self.__target(*self.__args, **self.__kwargs) /tmp/test1.py(9)test() -> print Transformer().compile_node(b) /usr/local/lib/python2.5/compiler/transformer.py(160)compile_node() -> return self.eval_input(node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(195)eval_input() -> return Expression(self.com_node(nodelist[0])) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(602)and_test() -> return self.com_binary(And, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(606)not_test() -> result = self.com_node(nodelist[-1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(613)comparison() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(646)expr() -> return self.com_binary(Bitor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(650)xor_expr() -> return self.com_binary(Bitxor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(654)and_expr() -> return self.com_binary(Bitand, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(658)shift_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(670)arith_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(682)term() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(702)factor() -> node = self.lookup_node(nodelist[-1])(nodelist[-1][1:]) /usr/local/lib/python2.5/compiler/transformer.py(714)power() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(726)atom() -> return self._atom_dispatch[nodelist[0][0]](nodelist) /usr/local/lib/python2.5/compiler/transformer.py(731)atom_lpar() -> return self.com_node(nodelist[1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(577)testlist_gexp() -> return self.testlist(nodelist) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(602)and_test() -> return self.com_binary(And, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(606)not_test() -> result = self.com_node(nodelist[-1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(613)comparison() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(646)expr() -> return self.com_binary(Bitor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(650)xor_expr() -> return self.com_binary(Bitxor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(654)and_expr() -> return self.com_binary(Bitand, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(658)shift_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(670)arith_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(682)term() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(702)factor() -> node = self.lookup_node(nodelist[-1])(nodelist[-1][1:]) /usr/local/lib/python2.5/compiler/transformer.py(714)power() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(726)atom() -> return self._atom_dispatch[nodelist[0][0]](nodelist) /usr/local/lib/python2.5/compiler/transformer.py(731)atom_lpar() -> return self.com_node(nodelist[1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(577)testlist_gexp() -> return self.testlist(nodelist) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(602)and_test() -> return self.com_binary(And, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(606)not_test() -> result = self.com_node(nodelist[-1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(613)comparison() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(646)expr() -> return self.com_binary(Bitor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(650)xor_expr() -> return self.com_binary(Bitxor, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(654)and_expr() -> return self.com_binary(Bitand, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(658)shift_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(670)arith_expr() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(682)term() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(702)factor() -> node = self.lookup_node(nodelist[-1])(nodelist[-1][1:]) /usr/local/lib/python2.5/compiler/transformer.py(714)power() -> node = self.com_node(nodelist[0]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(726)atom() -> return self._atom_dispatch[nodelist[0][0]](nodelist) /usr/local/lib/python2.5/compiler/transformer.py(731)atom_lpar() -> return self.com_node(nodelist[1]) /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) /usr/local/lib/python2.5/compiler/transformer.py(577)testlist_gexp() -> return self.testlist(nodelist) /usr/local/lib/python2.5/compiler/transformer.py(567)testlist() -> return self.com_binary(Tuple, nodelist) /usr/local/lib/python2.5/compiler/transformer.py(1065)com_binary() -> return self.lookup_node(n)(n[1:]) /usr/local/lib/python2.5/compiler/transformer.py(579)test() -> def test(self, nodelist): (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(581)test() -> if len(nodelist) == 1 and nodelist[0][0] == symbol.lambdef: (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(583)test() -> then = self.com_node(nodelist[0]) (Pdb) s --Call-- /usr/local/lib/python2.5/compiler/transformer.py(787)com_node() -> def com_node(self, node): (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(792)com_node() -> return self._dispatch[node[0]](node[1:]) (Pdb) s --Call-- /usr/local/lib/python2.5/compiler/transformer.py(593)or_test() -> def or_test(self, nodelist): (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(595)or_test() -> if len(nodelist) == 1 and nodelist[0][0] == symbol.lambdef: (Pdb) n /usr/local/lib/python2.5/compiler/transformer.py(597)or_test() -> return self.com_binary(Or, nodelist) (Pdb) s --Call-- /usr/local/lib/python2.5/compiler/transformer.py(1060)com_binary() -> def com_binary(self, constructor, nodelist): (Pdb) bt Bus error (core dumped)
Paul> And I feel that It's bug in python, or python port, because I'm Paul> getting Bus error on some stage when I'm tracing execution and Paul> trying to backtrace. Have you run it under control of a C-level debugger (gdb, dbx, etc) to see where the bus error occurs? Skip
Martin v. Löwis wrote:
You should run it under gdb, or attach to the interpreter from gdb.
I've run it with gdb before (when posted a bug), and sometimes I got a huge traceback with 10000+ lines and sometimes less than 100 full of question marks so I've decided it's not of a great interest. Today I've got quite good backtrace :)
Could it be that you get a stack overflow? To my knowledge, stack space is very scarce on FreeBSD if you use threads.
Well, yes it is! I've tested stack overflow before without using threads, and it throws an exception as expected. But this: def test(): test() from threading import Thread t = Thread(target = test) t.start() t.join() Produces "Segmentation fault" on python2.4 and "Bus error" on python2.5. Following line: threading.stack_size(1<<19) Fixes this problem for python2.5. Thanks a lot. I think I'll set up it in sitecustomize.py. I don't know but maybe you should consider change platform defaults. -- Paul.
Thanks a lot. I think I'll set up it in sitecustomize.py. I don't know but maybe you should consider change platform defaults.
Such a patch should be contributed by a FreeBSD expert. Different versions of FreeBSD behave differently, with too many conditions to consider. It's a mess. The simplest thing to do would be to stop supporting threading on FreeBSD. Regards, Martin
On Sat, Jul 28, 2007, Paul Colomiets wrote:
[...]
Because I can't resist: shouldn't that be a "truck error" if you're using transformer.py? For those who don't get it: http://en.wikipedia.org/wiki/Transformers_%28fiction%29 -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ This is Python. We don't care much about theory, except where it intersects with useful practice.
participants (4)
-
"Martin v. Löwis"
-
Aahz
-
Paul Colomiets
-
skip@pobox.com