[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

bug in xml-output-editor (?)

From: Ben Collins-Sussman <sussman_at_newton.collab.net>
Date: 2000-11-30 17:11:11 CET

Hey Greg H. --

I found a repeatable segfault bug in xml_output.c when I try to commit
under certain simple circumstances.

Specifically, I check out the "t1" subdir, append to one file, and
replace the contents of a second file. When I commit, the segfault
happens in xml_output.c (get_to_elem), line 169 -- attempting to
dereference a NULL value of fb. fb is NULL because eb->curfile is
NULL.

Beyond that, it's hard for me to understand what's wrogn, only because
I don't feel like taking the time to understand all of your code. I
have a million other things on my to-do list. :)

Here's the script I'm using; segfaults every time:

------------------------------------------------------------------
#!/bin/sh

# Testing merging and conflict resolution.

SVN_PROG=../svn
TEST_DIR_1=t1
TEST_DIR_2=t2
COMMIT_RESULTFILE_NAME=commit3
ANCESTOR_PATH=anni # See if Greg Stein notices. :-)

check_status()
{
    res=$?
    if [ $res -ne 0 ]; then
      echo Oops, problem: ${@-"(no further details)"}
      exit $res
    fi
}

# Remove the testing trees
rm -rf ${TEST_DIR_1} ${TEST_DIR_2} ${COMMIT_RESULTFILE_NAME}*

echo

##### Run tests: #####

### Check out t1/
echo "Checking out ${TEST_DIR_1}."
${SVN_PROG} checkout \
      --target-dir ${TEST_DIR_1} \
      --xml-file ../../tests-common/xml/co1-inline.xml \
      --revision 1 \
      --ancestor-path ${ANCESTOR_PATH}

check_status 1

### Make local changes to pi's and rho's text.
echo "Making local text changes on pi and rho."
echo "new text for pi" >> ${TEST_DIR_1}/A/D/G/pi
echo "z" > ${TEST_DIR_1}/A/D/G/rho
check_status 2

### Examine status; we should see local mods present.
echo "Status of directory:"
${SVN_PROG} status ${TEST_DIR_1}
check_status 3

### Try to commit.
echo "Attempting to commit."
${SVN_PROG} commit --target-dir ${TEST_DIR_1} \
                   --xml-file ${COMMIT_RESULTFILE_NAME}-1.xml \
                   --revision 22
check_status 4

### Examine status; everything should be up-to-date.
echo "Status of directory:"
${SVN_PROG} status ${TEST_DIR_1}
check_status 5

exit 0
Received on Sat Oct 21 14:36:15 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.