Subject: bug#1491: Same problem in 23.0.60

From: Lars Rasmusson <[email-masked]>
Date: Fri, 5 Dec 2008 00:53:32 +0100

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:[email-masked]:/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...