GNU bug report logs -
#11380
emacs compilation fails in call to oblookup() with len=-1
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 29 Apr 2012 22:09:08 +0200
with message-id <m2d36qz4ez.fsf <at> igel.home>
and subject line Re: bug#11380: emacs compilation fails in call to oblookup() with len=-1
has caused the debbugs.gnu.org bug report #11380,
regarding emacs compilation fails in call to oblookup() with len=-1
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
11380: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11380
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
building emacs crashes in src/doc.c::oblookup() with len=-1. The following
patch solves the problem:
diff --git a/src/doc.c b/src/doc.c
index 9e48a4d..ce54fd2 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -655,41 +655,45 @@ the same file name is found in the `doc-directory'.
*/)
}
}
- sym = oblookup (Vobarray, p + 2,
- multibyte_chars_in_text ((unsigned char *) p + 2,
- end - p - 2),
- end - p - 2);
- /* Check skip_file so that when a function is defined several
- times in different files (typically, once in xterm, once in
- w32term, ...), we only pay attention to the one that
- matters. */
- if (! skip_file && SYMBOLP (sym))
- {
- /* Attach a docstring to a variable? */
- if (p[1] == 'V')
- {
- /* Install file-position as variable-documentation property
- and make it negative for a user-variable
- (doc starts with a `*'). */
- if (!NILP (Fboundp (sym)))
- Fput (sym, Qvariable_documentation,
- make_number ((pos + end + 1 - buf)
- * (end[1] == '*' ? -1 : 1)));
- }
-
- /* Attach a docstring to a function? */
- else if (p[1] == 'F')
+ EMACS_INT len = end - p - 2;
+ if (len>0)
+ {
+ sym = oblookup (Vobarray, p + 2,
+ multibyte_chars_in_text ((unsigned char *) p
+ 2,
+ end - p - 2),
+ len);
+ /* Check skip_file so that when a function is defined several
+ times in different files (typically, once in xterm, once
in
+ w32term, ...), we only pay attention to the one that
+ matters. */
+ if (! skip_file && SYMBOLP (sym))
{
- if (!NILP (Ffboundp (sym)))
- store_function_docstring (sym, pos + end + 1 - buf);
+ /* Attach a docstring to a variable? */
+ if (p[1] == 'V')
+ {
+ /* Install file-position as variable-documentation
property
+ and make it negative for a user-variable
+ (doc starts with a `*'). */
+ if (!NILP (Fboundp (sym)))
+ Fput (sym, Qvariable_documentation,
+ make_number ((pos + end + 1 - buf)
+ * (end[1] == '*' ? -1 : 1)));
+ }
+
+ /* Attach a docstring to a function? */
+ else if (p[1] == 'F')
+ {
+ if (!NILP (Ffboundp (sym)))
+ store_function_docstring (sym, pos + end + 1 -
buf);
+ }
+ else if (p[1] == 'S')
+ ; /* Just a source file name boundary marker. Ignore
it. */
+
+ else
+ error ("DOC file invalid at position %"pI"d", pos);
}
- else if (p[1] == 'S')
- ; /* Just a source file name boundary marker. Ignore it. */
-
- else
- error ("DOC file invalid at position %"pI"d", pos);
- }
- }
+ }
+ }
pos += end - buf;
filled -= end - buf;
memmove (buf, end, filled);
Regards,
Dov
On Sun, Apr 29, 2012 at 20:41, Dov Grobgeld <dov.grobgeld <at> gmail.com> wrote:
> Chucking out git head (git commit e3e392d from git://repo.or.cz/emacs.git)
> and doing a debug build as described below
> fails. The compilation looks for the non-existing file "chkmalloc.h".
>
> Here are the steps that I performed:
>
> ./autogen.sh
> ./configure --prefix=/usr/local/public-dev/ CPPFLAGS=-DDEBUG CFLAGS="-g
> -O0"
> make
>
> which fails as follows:
>
> gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../src -I../lib
> -I/space/pub-repos/emacs.git/lib-src
> -I/space/pub-repos/emacs.git/lib-src/../src
> -I/space/pub-repos/emacs.git/lib-src/../lib -Wl,-znocombreloc -DDEBUG -g
> -O0 -DEMACS_NAME="\"GNU Emacs\"" \
> -DVERSION="\"24.1.50\"" /space/pub-repos/emacs.git/lib-src/etags.c \
> regex.o ../lib/libgnu.a -o etags
> /space/pub-repos/emacs.git/lib-src/etags.c:233:24: fatal error:
> chkmalloc.h: No such file or directory
>
> System is: Linux grower 3.3.2-6.fc16.i686 #1 SMP Sat Apr 21 13:23:12 UTC
> 2012 i686 i686 i386 GNU/Linux
>
> Regards,
> Dov
>
>
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
As I said this can only happen if make-docfile is broken, which it was.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
This bug report was last modified 13 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.