GNU bug report logs -
#1491
bug in ebrowse 22.1
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1491 in the body.
You can then email your comments to 1491 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1491
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Lars Rasmusson <lars.rasmusson <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Hi,
ebrowse 22.1 crashes with a "Bus error on the following input:
struct a
{
};
However, ebrowse works fine with the following input:
struct a {
};
I'm running on a PPC Mac G4 on and OS X 10.5.5.
Cheers,
/Lars
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1491
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"richardeng" <richardeng <at> foxmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 1491 <at> emacsbugs.donarmstrong.com (full text, mbox):
try the last Emacs cvs version 23.0.60. Maybe your problem is solved.
# ebrowse --version
ebrowse 23.0.60
Copyright (C) 2008 Free Software Foundation, Inc.
This program is distributed under the same terms as Emacs.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1491
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Lars Rasmusson <lars.rasmusson <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 1491 <at> emacsbugs.donarmstrong.com (full text, mbox):
Sorry, I still get the same error...
This is what I do:
$ uname -a
Darwin lmac.local 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3
11:31:44 PDT 2008; root:xnu-1228.7.58~1/RELEASE_PPC Power Macintosh
$ cd /tmp
$ cvs -d :pserver:anonymous <at> cvs.savannah.gnu.org:/sources/emacs co emacs
$ cd emacs
$ ./configure --without-gif
$ cd lib-src
$ make ebrowse
cp /tmp/emacs/lib-src/getopt_.h getopt.h-t
mv getopt.h-t getopt.h
gcc -c -DHAVE_CONFIG_H -I. -I../src -I/tmp/emacs/lib-src -I/tmp/emacs/
lib-src/../src -g -O2 -Wno-pointer-sign /tmp/emacs/lib-src/getopt.c
gcc -c -DHAVE_CONFIG_H -I. -I../src -I/tmp/emacs/lib-src -I/tmp/emacs/
lib-src/../src -g -O2 -Wno-pointer-sign /tmp/emacs/lib-src/getopt1.c
gcc -DHAVE_CONFIG_H -I. -I../src -I/tmp/emacs/lib-src -I/tmp/emacs/lib-
src/../src -g -O2 -Wno-pointer-sign -DVERSION="\"23.0.60\"" /tmp/
emacs/lib-src/ebrowse.c getopt.o getopt1.o -o ebrowse
$ ./ebrowse --version
ebrowse 23.0.60
Copyright (C) 2008 Free Software Foundation, Inc.
This program is distributed under the same terms as Emacs.
lmac:lib-src larsr$ cat > eb.h
struct a
{
};
$ ebrowse eb.h
Bus error
$
From GDB I found that it crashes like this:
(gdb) file ./ebrowse
(gdb) run eb.h
Starting program: /private/tmp/emacs/lib-src/ebrowse eb.h
Reading symbols for shared libraries ++. done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00015fff
matching_regexp () at /tmp/emacs/lib-src/ebrowse.c:2039
2039 if (*p == '\n')
(gdb) bt
#0 matching_regexp () at /tmp/emacs/lib-src/ebrowse.c:2039
#1 0x00007fe8 in class_definition (containing=<value temporarily
unavailable, due to optimizations>, tag=321, flags=0, nested=0) at /
tmp/emacs/lib-src/ebrowse.c:3149
#2 0x00008498 in globals (start_flags=0) at /tmp/emacs/lib-src/
ebrowse.c:3521
#3 0x00008568 in yyparse () at /tmp/emacs/lib-src/ebrowse.c:3554
#4 0x000086b4 in process_file (file=<value temporarily unavailable,
due to optimizations>) at /tmp/emacs/lib-src/ebrowse.c:3741
#5 0x00009248 in main (argc=2, argv=0xbffff958) at /tmp/emacs/lib-src/
ebrowse.c:3946
(gdb)
Hope it is useful...
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1491
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"richardeng" <richardeng <at> foxmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at 1491 <at> emacsbugs.donarmstrong.com (full text, mbox):
$ uname -a
Linux debian 2.6.24-1-686 #1 SMP Thu May 8 02:16:39 UTC 2008 i686 GNU/Linux
$ cat > eb.h
struct a
{
};
$ ebrowse eb.h // no problem here, BROWSE file is generated. Maybe, ebrowse have some problem with '\r' in MacOS, you can change '\r' to '\n' and try again.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1491
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Lars Rasmusson <lars.rasmusson <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #25 received at 1491 <at> emacsbugs.donarmstrong.com (full text, mbox):
Isn't this a bug?
On line ebrowse.c:2037
for (--p; p >= inbuffer && *p != '\n'; --p)
;
I think it should be
for (--p; p > inbuffer && *p != '\n'; --p)
;
otherwise p may point to one character before inbuffer.
The backwards scanning is done correctly nine lines
further up, on ebrowse.c:2028
(OS X really has some neat features to prevent accessing
data from screwed up pointers! :-) )
/Lars
Btw, is it really ok to write as in ebrowse.c:1530 ?
/* Skip over white space. The `#' has been consumed already. */
while (WHITEP (GET (c)))
;
GET(c) will eat up one character of the input, no matter whether it is a
white space or not...
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1491
; Package
emacs
.
(Wed, 14 Jan 2009 04:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 14 Jan 2009 04:15:03 GMT)
Full text and
rfc822 format available.
Message #30 received at 1491 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Isn't this a bug?
> On line ebrowse.c:2037
> for (--p; p >= inbuffer && *p != '\n'; --p)
> ;
> I think it should be
> for (--p; p > inbuffer && *p != '\n'; --p)
> ;
> otherwise p may point to one character before inbuffer.
It looks wrong, indeed. Does changing >= to > fix the crash for you?
Reply sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
(Wed, 14 Jan 2009 13:50:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lars Rasmusson <lars.rasmusson <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 14 Jan 2009 13:50:03 GMT)
Full text and
rfc822 format available.
Message #35 received at 1491-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Lars Rasmusson <lars.rasmusson <at> gmail.com> writes:
>> It looks wrong, indeed. Does changing >= to > fix the crash for you?
>
> Yes it does.
I've checked in your fix. Thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Wed, 11 Feb 2009 15:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.