segfault when unrevisioned files exist in working tree
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Martin Pool | ||
2.0 |
Fix Released
|
Medium
|
Martin Pool | ||
Gentoo Linux |
Unknown
|
Medium
|
Bug Description
I built and installed an rpm of bzr-2.0.0 from source, but I am getting segfault when I try to do bzr st or bzr diff and a file exists in the tree which is not revisioned:
; bzr init foo
Created a standalone tree (format: 2a)
; cd foo/
; touch bar
; bzr st
Segmentation fault
Valgrind indicates it is a null access:
; valgrind /usr/bin/bzr st
... (python errors suppressed as python says they should be)
==21943== Invalid read of size 4
==21943== at 0xC4C9BF2: __pyx_f_
==21943== by 0xC4CE451: __pyx_f_
==21943== by 0xC4B2FDA: __pyx_f_
==21943== by 0x3228691422: PyEval_EvalFrame (in /usr/lib64/
==21943== by 0x3228695FE4: PyEval_EvalCodeEx (in /usr/lib64/
==21943== by 0x322869473E: PyEval_EvalFrame (in /usr/lib64/
==21943== by 0x3228695FE4: PyEval_EvalCodeEx (in /usr/lib64/
==21943== by 0x322864C459: (within /usr/lib64/
==21943== by 0x32286360EF: PyObject_Call (in /usr/lib64/
==21943== by 0x322869352B: PyEval_EvalFrame (in /usr/lib64/
==21943== by 0x3228695FE4: PyEval_EvalCodeEx (in /usr/lib64/
==21943== by 0x322869473E: PyEval_EvalFrame (in /usr/lib64/
==21943== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21943==
==21943== Process terminating with default action of signal 11 (SIGSEGV)
==21943== Access not within mapped region at address 0x0
==21943== at 0xC4C9BF2: __pyx_f_
==21943== by 0xC4CE451: __pyx_f_
==21943== by 0xC4B2FDA: __pyx_f_
==21943== by 0x3228691422: PyEval_EvalFrame (in /usr/lib64/
==21943== by 0x3228695FE4: PyEval_EvalCodeEx (in /usr/lib64/
==21943== by 0x322869473E: PyEval_EvalFrame (in /usr/lib64/
==21943== by 0x3228695FE4: PyEval_EvalCodeEx (in /usr/lib64/
==21943== by 0x322864C459: (within /usr/lib64/
==21943== by 0x32286360EF: PyObject_Call (in /usr/lib64/
==21943== by 0x322869352B: PyEval_EvalFrame (in /usr/lib64/
==21943== by 0x3228695FE4: PyEval_EvalCodeEx (in /usr/lib64/
==21943== by 0x322869473E: PyEval_EvalFrame (in /usr/lib64/
==21943==
This is a CentOS 5 system running python 2.4 on x86_64
Related branches
- John A Meinel: Approve
-
Diff: 32 lines (+6/-1)2 files modifiedNEWS (+3/-0)
setup.py (+3/-1)
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: centos |
Changed in gentoo: | |
status: | Unknown → In Progress |
Changed in bzr: | |
assignee: | nobody → Martin Pool (mbp) |
status: | Confirmed → In Progress |
tags: | added: easy pyrex |
Changed in bzr: | |
milestone: | none → 2.1.0rc1 |
status: | In Progress → Fix Released |
Changed in gentoo: | |
status: | In Progress → Invalid |
Changed in gentoo: | |
status: | Invalid → Confirmed |
Changed in gentoo: | |
status: | Confirmed → Unknown |
Changed in gentoo: | |
importance: | Unknown → Medium |
The function in question is: traverse_ 21_dirstate_ helpers_ pyx_Reader( PyObject *o, visitproc v, void *a) { 21_dirstate_ helpers_ pyx_Reader *p = (struct __pyx_obj_ 21_dirstate_ helpers_ pyx_Reader *)o;
static int __pyx_tp_
int e;
struct __pyx_obj_
if (p->state) {
e = (*v)(p->state, a); if (e) return e;
}
if (p->text) {
e = (*v)(p->text, a); if (e) return e; // line 8401
}
return 0;
}
Since p-> have already been used I guess it has to be v that is NULL.