This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

FW: XEmacs-mule and egcs


Since I had Andreas check this out, and he confirms I am not crazy or
stupid (at least in regard to this matter), I am forwarding this to the
list. The problem occurs with any optimization greater than -0 and, as you
see, has arisen only in the last several revisions. If I need to provide
other information or more code snippets, there's no need to flame, just
tell me <g>. Oh, also, Martin Buchholz thought it might have to do with
tolower, but couldn't pinpoint just what.

-----Original Message-----
From: Andreas Jaeger [mailto:aj@arthur.rhein-neckar.de]
Sent: Tuesday, April 21, 1998 12:35
To: Michael Harnois
Subject: Re: XEmacs-mule and egcs

With egcs-2.91.24 I can reproduce your problem (with 2.91.16 I couldn't):

Program received signal SIGSEGV, Segmentation fault.
0x4028c4b9 in memcpy (dstpp=0x83ded04, srcpp=0x83debec, len=136122783)
    at ../sysdeps/generic/memcpy.c:55
55            WORD_COPY_FWD (dstp, srcp, len, len);
(gdb) bt
#0  0x4028c4b9 in memcpy (dstpp=0x83ded04, srcpp=0x83debec, len=136122783)
    at ../sysdeps/generic/memcpy.c:55
#1  0x807dd12 in resize_string (s=0x83d917c, pos=194, delta=-136122589)
    at /mnt/xemacs/cvs-sources/xemacs-20/src/alloc.c:2268
#2  0x8082aff in set_string_char (s=0x83d917c, i=161, c=161)
    at /mnt/xemacs/cvs-sources/xemacs-20/src/alloc.c:2329
#3  0x8091e0d in complex_vars_of_casetab ()
    at /mnt/xemacs/cvs-sources/xemacs-20/src/casetab.c:323
#4  0x80ad737 in xemacs_21_0_b36_i486_pc_linux (argc=4, argv=0xbffffa40,
    envp=0xbffffa54, restart=0)
    at /mnt/xemacs/cvs-sources/xemacs-20/src/emacs.c:1486
#5  0x80af162 in main (argc=4, argv=0xbffffa40, envp=0xbffffa54)
    at /mnt/xemacs/cvs-sources/xemacs-20/src/emacs.c:2019
#6  0x40245d06 in __libc_start_main (main=0x80af100 <main>, argc=4,
    argv=0xbffffa40, init=0x8079870 <_init>, fini=0x81cb4f0 <_fini>,
    rtld_fini=0x4000a580 <_dl_fini>) at ../sysdeps/generic/libc-start.c:72

I do think this is either a compiler bug or a very, very strange
XEmacs bug.  Looking at alloc.c with gdb I get:
#2  0x8082aff in set_string_char (s=0x83d917c, i=161, c=161)
    at /mnt/xemacs/cvs-sources/xemacs-20/src/alloc.c:2329
2329        resize_string (s, bytoff, newlen - oldlen);
(gdb) p newlen
$1 = 3
(gdb) p oldlen
$2 = 136122592

The value of oldlen is definitly wrong :-(.

I don't know what's wrong and don't know if I manage to debug this.
Feel free to send a bug report to xemacs-beta (or egcs?) and state
that it's "reproducable";-).

Andreas
--
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@alma.student.uni-kl.de



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