emacs21 segfaults

Alexander Sack asac@jwsdot.com
Sat, 13 Nov 2004 13:44:44 +0100


Robert Millan wrote:

>Hi!
>
>Sorry for the late response (I read glibc-bsd-devel regularly, but not
>debian-bsd).
>
>On Mon, Oct 04, 2004 at 07:27:09PM +0200, Alexander Sack wrote:
>  
>
>>emacs21 segfault on my up-to date debian kfreebsd system.
>>    
>>
>
>Could you run ldd on it and check which libpthread.so is it linked with?
>
>  
>
>>Here the gdb 
>>output:
>>
>>Program received signal SIGSEGV, Segmentation fault.
>>0x284ce9b8 in __strspn_c3 (
>>   __s=0x23000 <Error reading address 0x23000: Bad address>,
>>   __accept1=536870912, __accept2=20960, __accept3=135680543)
>>   at string2.h:1006
>>1006    string2.h: No such file or directory.
>>    
>>
>
>It'd be interesting to see what string2.h:1006 contains, and wether string2.h
>is part of emacs21 or glibc.  Could you investigate?
>
>  
>
FYI, I just rebuild emacs21 on my box and it works. So it appears that a 
respin of the package in the archives might solve this issue.
You still want to know what it is in string2.h? string2.h exists only in 
glibc. Here is the function that failed:


__STRING_INLINE size_t
__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
{
  register size_t __result = 0;
  /* Please note that __accept1 to __accept3 never can be '\0'.  */
  while (__s[__result] == __accept1 || __s[__result] == 
__accept2         <<<<=== Line 1006
         || __s[__result] == __accept3)
    ++__result;
  return __result;
}
#endif