This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

setup crashes


a crash in setup occurs at install.cc:657 in function
md5_one():
void md5_one (const packagesource& source)
      io_stream *thefile = io_stream::open
(source.Cached (), "rb");

the class String constructor String::String (const
char *acString) at String++.cc:46
is passed a null argument acString, causing an
exception in memcpy() at String++.cc:48.

the memory dump of class packagesource source,
argument to md5_one(), is at 0xa20a718, shown below;
the memory dump of contained class String cached is at
0x0a22a880, shown below.
(gdb does not understand class packagesource in this
frame.)
String::_data::cstr has a value of 0x0.

what is the semantics of String::_data::cstr?
what is the semantics of String::Cached() in class
packagesource?

something is broken in there.

this event pertains to the class packagesource
instance for package zlib.
this packagesource instance for zlib at this point is
a different one from the one used by
validateCachedPackage() at download.cc:74, during the
initial md5 checks.

i am not clear if the packagesource instance is being
stepped on or if it is not being properly set up.

is this enough information for you to understand where
the problem is?
i can do more work on the problem if need be.

the crash happens with setup 2.415, 2.416 and 2.418.
i am debugging setup 2.415.

i include some useful parts of the debug session
below.









$ gdb setup.exe
GNU gdb 2003-09-20-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) break install.cc:503
Breakpoint 1 at 0x41bf89: file install.cc, line 503.

...

(gdb)
Continuing.
warning: LOG: 1 For file
file://I:\cygwin/release/which/which-1.5-2.tar.bz2 ini
digest is 01685c4933406033f0931b57d7754644 file digest
is 01685c4933406033f0931b
57d7754644

Breakpoint 1, do_install_thread(HINSTANCE__*, HWND__*)
(h=0x0, owner=0x1)
    at install.cc:503
503                       md5_one (*pkg.desired.source
());
(gdb) s
packageversion::source() (this=<incomplete type>)
    at /usr/include/c++/3.2/bits/stl_vector.h:261
261         { return size_type(end() - begin()); }
(gdb)
292     {
(gdb)
261         { return size_type(end() - begin()); }
(gdb)
584           __normal_iterator(const _Iterator& __i)
: _M_current(__i) { }
(gdb)
633           base() const { return _M_current; }
(gdb)
261         { return size_type(end() - begin()); }
(gdb)
584           __normal_iterator(const _Iterator& __i)
: _M_current(__i) { }
(gdb)
296     }
(gdb)
md5_one(packagesource const&) (source=@0xa20a718) at
MD5++.h:31
31        bool isSet() const {return _set;}
(gdb)
653     {
(gdb)
31        bool isSet() const {return _set;}
(gdb)
packagesource::Cached() const (this=0xa20a718) at
package_source.h:99
99          return cached.cstr_oneuse();
(gdb)
String::cstr_oneuse() const (this=0xa20a74c) at
String++.cc:103
103       if (theData->length == 0)
(gdb)
104         return NULL;
(gdb)
111     }
(gdb)
String::String(char const*) (this=0x16afe0c,
acString=0x0) at String++.cc:47
47      {
(gdb)
0x0043d200      49      }
(gdb)
0x0043d036 in String::_data::_data(unsigned)
(this=0xa0423d8, aLength=0)
    at String++.cc:35
35      String::_data::_data(size_t aLength): count
(1), theString(new unsigned
char[aLength]), cstr(0), length (aLength) {}
(gdb)
String::String(char const*) (this=0x16afe0c,
acString=0x0) at String++.cc:48
48        memcpy (theData->theString, acString,
theData->length);
(gdb)  bt
#0  String::String(char const*) (this=0x16afe0c,
acString=0x0)
    at String++.cc:48
#1  0x0041c52d in md5_one(packagesource const&)
(source=@0xa20a718)
    at install.cc:657
#2  0x0041bf9f in do_install_thread(HINSTANCE__*,
HWND__*) (h=0x0, owner=0x1)
    at install.cc:503
#3  0x0a05e950 in ?? ()
(gdb) x/16xw 0xa20a718
0xa20a718:      0x0049dbe8      0x0000f315     
0x3d19a1e0      0x49df1186
0xa20a728:      0x8f1ddd11      0x0b073144     
0x00000001      0x0a227830
0xa20a738:      0x0a227830      0x0a227834     
0x0a22a820      0x0a22a848
0xa20a748:      0x0a22a860      0x0a22a880     
0x00000000      0x00000000
(gdb) x/s 0x0a22a820
0xa22a820:       "release/zlib/zlib-1.1.4-4.tar.bz2"
(gdb) x/s  0x0a22a848
0xa22a848:       "zlib-1.1.4-4"
(gdb) x/s  0x0a22a860
0xa22a860:       "zlib-1.1.4-4.tar.bz2"
(gdb) x/4xw 0x0a22a880
0xa22a880:      0x00000001      0x0a22a898     
0x00000000      0x00000000
(gdb) x/s   0x0a22a898
0xa22a898:       ""


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]