|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#11380: closed (emacs compilation fails in call to oblookup() with len=-1) |
Date: | Sun, 29 Apr 2012 20:11:01 +0000 |
Your message dated Sun, 29 Apr 2012 22:09:08 +0200 with message-id <address@hidden> 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 address@hidden) -- 11380: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11380 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: emacs compilation fails in call to oblookup() with len=-1 Date: Sun, 29 Apr 2012 20:59:29 +0300 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,
DovOn Sun, Apr 29, 2012 at 20:41, Dov Grobgeld <address@hidden> 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
--- End Message ---
--- Begin Message ---Subject: Re: bug#11380: emacs compilation fails in call to oblookup() with len=-1 Date: Sun, 29 Apr 2012 22:09:08 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.96 (gnu/linux) As I said this can only happen if make-docfile is broken, which it was. Andreas. -- Andreas Schwab, address@hidden GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |