bzr.dev does not support pyrex 0.9.4.1

Bug #276868 reported by GuilhemBichot
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
John A Meinel

Bug Description

Linux 32 bit gcc 4.1.2 (opensuse 10.2).
Must have been introduced in the past weeks. When I do a fresh branch of bzr.dev and execute "make", I see many compiler warnings in _btree_serializer_c.c bzrlib/_knit_load_data_c.c bzrlib/_dirstate_helpers_c.c bzrlib/_readdir_pyx.c (attached). The generated bzr segfaults on simple operations like:
bzr init bzr1 # initial branch
cd bzr1
cat >foo <<EOF
1
2
3
4
5
6
EOF
bzr add foo
bzr commit -m "A"
bzr branch . ../bzr2 # segfault here
After upgrading pyrex (I was using opensuse 10.2's version) to the latest one, warnings and segfault go away.

Revision history for this message
GuilhemBichot (guilhem-bichot) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

We tracked it down to revision 3739 on bzr.dev which happens to be:

 3739 Canonical.com Patch Queue Manager 2008-09-26 [merge]
      (robertc) Create a pyrex optimised iter_changes for dirstate trees.
       (Robert Collins)

So it seems something in the new iter_changes code causes pyrex 0.9.4.1 to generate code that will cause a segfault.

Revision history for this message
John A Meinel (jameinel) wrote :

Trying to debug the pyrex output, it appears that it sometimes does:

PY_XDECREF(pointer); pointer = 0;

and then later does

PY_DECREF(pointer).

So it seems we are just triggering a bug in pyrex 0.9.4.1. Further, it seems to only happen because the functions are long and complex enough that it re-uses some of its temporary variables.

There doesn't seem to be an easy way to work around this, so instead we'll just blacklist that version of the compiler. It won't effect released versions, because we always bundle the .c files anyway.

Changed in bzr:
assignee: nobody → jameinel
importance: Undecided → Medium
milestone: none → 1.8
status: New → In Progress
John A Meinel (jameinel)
Changed in bzr:
status: In Progress → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.