public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
* RE:Windows NT Failing on XRef Generation
@ 2001-02-13  4:55 Darren Syzling
  2001-02-13  9:15 ` SourceNav Symbol Browser Closed Bill Munday
  2001-02-13 23:05 ` RE:Windows NT Failing on XRef Generation Mo DeJong
  0 siblings, 2 replies; 5+ messages in thread
From: Darren Syzling @ 2001-02-13  4:55 UTC (permalink / raw)
  To: sourcenav

We've also seen a crash on xref generation under NT with the 4.5.2 stable
release.  Unfortunately this occurs within our product code base and is a little
difficult to extract a repeatable test case.

I've had limited time to track this down and this is the first time I've had a
look over the source code so excuse my complete ignorance, but here's some info
on my findings:

The crash occurs in dbimp.exe when building refs to one of our unit test files
which is quite large (> 2000 lines) on a symbol which is used extensively (we're
using a C++ port of JUnit).  It seems sensitive to the size of the file or may
be the number of symbols it's cross referencing.

The crash occurs in db\btree\btsearch.c within the __bt_search function on the
following line:
next:          BT_PUSH(t, h->pgno, index);

I believe it's writing the "proj.by" file, part of the stack trace includes:
db_insert_entry(int type,char *key_buf,char *data_buf)
    __bt_put(dbp, key, data, flags)
      __bt_search

The problem appears to be caused by the bp_sp member of the _btree structure
being corrupted  (the _btree instance is passed to the search function).   What
actually appears to be happening in this case is that we iterate over the tree
looking for a match and each time a parent page is pushed on the bt_stack.  The
bt_sp member is then incremented to point to the next location in the stack
array.  It seems that one of the many sentinel conditions is never triggered and
the function never checks for the array bounds being exceeded.  The bt_stack is
defined to a magic value of 50 in the btree header.  Once this is exceeded we
write the value of the page number over the bp_sp pointer (since it follows the
stack in memory - depending on padding and alignment) which is then
de-referenced by the next statement in the BT_PUSH macro - net result - boom !

Now obviously I could extend the size of the array, but I'm not sure of the
original reason for the magic value in the first place.  May be this situation
should never arise and the error is elsewhere...



Darren





******************************************************************************************************************************************************
This e-mail has been prepared using information  believed  by  the  author
to be reliable and accurate, but CWB makes  no  warranty  as to accuracy or
completeness. In particular CWB does not  accept  responsibility  for
changes  made to this e-mail after it was sent.  Any  opinions expressed in
this document are those of the author and do  not  necessarily reflect the
opinions of the company or its affiliates. They may be subject to change
without notice.
*******************************************************************************************************************************************************


^ permalink raw reply	[flat|nested] 5+ messages in thread

* SourceNav Symbol Browser Closed
  2001-02-13  4:55 RE:Windows NT Failing on XRef Generation Darren Syzling
@ 2001-02-13  9:15 ` Bill Munday
  2001-02-13 13:29   ` Ian Roxborough
  2001-02-13 23:05 ` RE:Windows NT Failing on XRef Generation Mo DeJong
  1 sibling, 1 reply; 5+ messages in thread
From: Bill Munday @ 2001-02-13  9:15 UTC (permalink / raw)
  To: egcs; +Cc: sourcenav

Hi,

I got into an akward situation where the Symbol browser window got
closed. I tried a to get it back again but I didn't so I decided to open
the project again using the editor. This caused the following error:

/home/bmunday/snavigator/bin/snavigator: line 6:  1292 Segmentation fault
$SN_HOME/bin/hyper -file $SN_HOME/share/etc/navigato -home $SN_HOME $*

[3]-  Exit 139                snavigator  (wd: ~)


Is there a way to get the Symbol window back without a crash?

Thanks
Bill


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SourceNav Symbol Browser Closed
  2001-02-13  9:15 ` SourceNav Symbol Browser Closed Bill Munday
@ 2001-02-13 13:29   ` Ian Roxborough
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Roxborough @ 2001-02-13 13:29 UTC (permalink / raw)
  To: Bill Munday; +Cc: sourcenav

Bill Munday wrote:
> 
> Hi,
> 
> I got into an akward situation where the Symbol browser window got
> closed. I tried a to get it back again but I didn't so I decided to open
> the project again using the editor. This caused the following error:
> 
> /home/bmunday/snavigator/bin/snavigator: line 6:  1292 Segmentation fault
> $SN_HOME/bin/hyper -file $SN_HOME/share/etc/navigato -home $SN_HOME $*
> 
> [3]-  Exit 139                snavigator  (wd: ~)
> 
> Is there a way to get the Symbol window back without a crash?

Well, I'd certainly hope so.  From the editor window did you try
the menu option, Windows -> New View -> Symbols, if so what happens?

recussively opening the same project for the same Source-Navigator
will probably cause a crash.

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE:Windows NT Failing on XRef Generation
  2001-02-13  4:55 RE:Windows NT Failing on XRef Generation Darren Syzling
  2001-02-13  9:15 ` SourceNav Symbol Browser Closed Bill Munday
@ 2001-02-13 23:05 ` Mo DeJong
  2001-02-14  8:51   ` Grep Editor function Bill Munday
  1 sibling, 1 reply; 5+ messages in thread
From: Mo DeJong @ 2001-02-13 23:05 UTC (permalink / raw)
  To: sourcenav

On Tue, 13 Feb 2001, Darren Syzling wrote:

> We've also seen a crash on xref generation under NT with the 4.5.2 stable
> release.  Unfortunately this occurs within our product code base and is a little
> difficult to extract a repeatable test case.

I know how hard it is to trim down a test case, but we really
need one if we are to be of any help tracking this down. Finding
bugs in compilers and parsers is really really hard, it is
just about impossible without a test case.

Mo DeJong
Red Hat Inc

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Grep Editor function
  2001-02-13 23:05 ` RE:Windows NT Failing on XRef Generation Mo DeJong
@ 2001-02-14  8:51   ` Bill Munday
  0 siblings, 0 replies; 5+ messages in thread
From: Bill Munday @ 2001-02-14  8:51 UTC (permalink / raw)
  To: egcs; +Cc: sourcenav

Hi,

I wonder if you could explain why grep editor dosen't search through the
project?

My pattern is CYGACC_COMM_IF_GETC
Files are *
Format

Ignore case is checked
100 entries

And when I Serch not hing is given

On the otherhand if I do it from the command line I get the following::

[bmunday@bmunday ecos]$ egrep -r CYGACC_COMM_IF_GETC *
assabet/redboot/install/include/cyg/hal/hal_if.h:#define
CYGACC_COMM_IF_GETC(_t_) \
assabet/redboot/install/include/cyg/hal/hal_if.h:#define
CYGACC_COMM_IF_GETC_SET(_t_, _x_) \
assabet/redboot/install/include/cyg/hal/hal_if.h:#define
CYGACC_COMM_IF_GETC_TIMEOUT(_t_, _c_) \
assabet/redboot/install/include/cyg/hal/hal_if.h:#define
CYGACC_COMM_IF_GETC_TIMEOUT_SET(_t_, _x_) \

Am I doing something wrong or is there a bug?

Thanks
Bill


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-02-14  8:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-13  4:55 RE:Windows NT Failing on XRef Generation Darren Syzling
2001-02-13  9:15 ` SourceNav Symbol Browser Closed Bill Munday
2001-02-13 13:29   ` Ian Roxborough
2001-02-13 23:05 ` RE:Windows NT Failing on XRef Generation Mo DeJong
2001-02-14  8:51   ` Grep Editor function Bill Munday

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).