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

[PATCH] Re: Results - Re: SPECIAL TESTS failing

From: David Summers <david_at_summersoft.fay.ar.us>
Date: 2004-07-10 19:33:02 CEST

On Sat, 10 Jul 2004, David Summers wrote:

> On Sat, 10 Jul 2004, Josh Pieper wrote:
>
> > David Summers wrote:
> > > $ svnadmin create /home/dsummers/svnroot/test
> > > $ svn co file:///home/dsummers/svnroot/test wc
> > > Checked out revision 0.
> > > $ mkdir symlinks; cd symlinks
> > > $ ln -s 1 2
> > > $ echo "test1" > test1
> > > $ ln -s test1 3
> > > $ cd ..
> > > $ svn import symlinks/ file:///home/dsummers/svnroot/test -m "import
> > > symlinks"
> > > Adding symlinks/test1
> > > Segmentation fault
> > >
> > > I tried to get a stack backtrace but when I configured
> > > --enable-maintainer-mode and "make clean" and recompiled then the problem
> > > disappeared(!!!!). However it is consistently seg faulting without the
> > > --enable-maintainer-mode. Any suggestions?
> > >
> > > Everything was working two weeks ago (before the "special file
> > > handling" patch went in) and no changes were made to the build
> > > process until two days ago.
> > >
> > > The only things I've changed:
> > > 1. I've upgraded to neon-0.24.7.
> > > 2. I've made a change to the doc Makefile r10198
> >
> > I can't reproduce this with or without --enable-maintainer-mode.
> > Perhaps you can try compiling with -g, but not
> > --enable-maintainer-mode. That may allow you to get a stacktrace of
> > the problem.
> >
>
> OK, I don't know what the difference between --enable-maintainer-mode and
> just putting -g in the compile but just putting -g in the compile allows
> me to get a backtrace where the --enable-mainter-mode didn't....wierd.
>
> Anyway, here is the stack trace:
>
> #0 0x400e3823 in svn_mime_type_is_binary (
> mime_type=0x2e000001 <Address 0x2e000001 out of bounds>) at
> string2.h:935
> #1 0x08050130 in notify (baton=0x8062ae8, path=0x80bc598 "symlinks/2",
> action=svn_wc_notify_commit_added, kind=svn_node_file,
> mime_type=0x2e000001 <Address 0x2e000001 out of bounds>,
> content_state=svn_wc_notify_state_inapplicable,
> prop_state=svn_wc_notify_state_inapplicable, revision=-1)
> at subversion/clients/cmdline/notify.c:314
> #2 0x4001e906 in import_file (editor=0x808d0e0, dir_baton=0x8063090,
> path=0x80bc598 "symlinks/2", edit_path=0x80bc5a8 "2", ctx=0x80620a0,
> pool=0x80bc560) at subversion/libsvn_client/commit.c:205
> #3 0x4001eb4b in import_dir (editor=0x808d0e0, dir_baton=0x8063090,
> path=0x8062aa0 "symlinks", edit_path=0x4002f33f "", nonrecursive=0,
> excludes=0x8062b38, ctx=0x80620a0, pool=0x80bc598)
> at subversion/libsvn_client/commit.c:363
> #4 0x4001ed47 in import (path=0x8062aa0 "symlinks",
> new_entries=0x8062b98,
> editor=0x808d0e0, edit_baton=0x80a5e28, nonrecursive=0,
> excludes=0x8062b38, ctx=0x80620a0, pool=0x8061ad8)
> at subversion/libsvn_client/commit.c:479
> #5 0x4001f249 in svn_client_import (commit_info=0xbffff6a4,
> path=0x8062aa0 "symlinks",
> url=0x8062ac0 "file:///home/dsummers/svnroot/test", nonrecursive=0,
> ctx=0x80620a0, pool=0x8061ad8) at
> subversion/libsvn_client/commit.c:692
> #6 0x0804d0be in svn_cl__import (os=0x8061b10, baton=0x2e000001,
> pool=0x8061ad8) at subversion/clients/cmdline/import-cmd.c:121
> #7 0x0804f1a5 in main (argc=134538812, argv=0xbffff984)
> at subversion/clients/cmdline/main.c:1323
> #8 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
>

Here is a patch that *seems* to fix the problem. If this doesn't cause
any other problems then it seems to be a simple matter of a variable not
being initialized. Please let me know what you think.

Log:
* subversion/libsvn_client/commit.c (import_file) : Fix crash error caused
     caused by mime_type not being initialized.

Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c (revision 10214)
+++ subversion/libsvn_client/commit.c (working copy)
@@ -167,7 +167,7 @@
              apr_pool_t *pool)
 {
   void *file_baton;
- const char *mimetype;
+ const char *mimetype = 0;
   unsigned char digest[APR_MD5_DIGESTSIZE];
   const char *text_checksum;
   apr_hash_t* properties;

-- 
David Wayne Summers          "Linux: Because reboots are for hardware upgrades!"
david_at_summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 10 19:33:12 2004

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.