guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Program received signal SIGSEGV, Segmentation fault.


From: Mark H Weaver
Subject: Re: Program received signal SIGSEGV, Segmentation fault.
Date: Fri, 16 Nov 2012 16:23:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Bruce Korb <address@hidden> writes:
>>> figure out what caused the SIGSEGV.  I don't even know what function you
>> 
>> scm_from_locale_string().  I had a stack trace that disappeared
>> from the email.  (Typo of some sort.  Sorry.)
>
> Actually, it was scm_from_utf8_string, since GUILE_VERSION was 200005

Okay, that's the problem.  You told Guile that the C string was encoded
in UTF-8, but actually it was encoded in Latin-1:

> ERROR: Throw to key `decoding-error' with args `("scm_from_stringn" "input 
> locale conversion error" \
> 84 #vu8(84 104 105 115 32 112 114 111 103 114 97 109 32 114 101 97 100 115 32 
> 111 114 32 97 99 99 \
>  101 112 116 115 32 97 32 108 105 115 116 32 111 102 32 102 105 108 101 115 
> 32 97 110 100 32 112 \
>  114 105 110 116 115 32 116 104 101 32 110 97 109 101 115 32 111 102 32 116 
> 104 101 10 102 105 108 \
>  101 115 32 116 104 97 116 32 97 114 101 32 110 111 116 32 112 108 97 105 110 
> 32 116 101 120 116 46 \
>  32 32 64 105 123 112 108 97 105 110 32 116 101 120 116 125 32 99 104 97 114 
> 97 99 116 101 114 115 \
>  32 97 114 101 32 99 104 97 114 97 99 116 101 114 115 10 105 110 32 116 104 
> 101 32 114 97 110 103 \
>  101 32 111 102 32 48 120 50 48 32 116 104 114 117 32 48 120 55 69 32 40 39 
> 32 39 32 116 104 114 \
>  117 32 39 126 39 41 44 32 112 108 117 115 32 98 97 99 107 115 112 97 99 101 
> 44 10 119 104 105 116 \
>  101 115 112 97 99 101 32 99 104 97 114 97 99 116 101 114 115 32 97 110 100 
> 32 116 104 101 32 99 \
>  104 97 114 97 99 116 101 114 32 48 120 65 57 32 40 169 32 45 32 116 104 101 
> 32 99 111 112 121 114 \
>  105 103 104 116 32 99 104 97 114 97 99 116 101 114 41 46))'.

That 169 on the second-to-the-last line is 0xA9, which is the Latin-1
encoding for the copyright symbol.  It is not legal as a bare character
in UTF-8.  The correct UTF-8 encoding for that symbol is 0xC2 0xA9.

As for the SIGSEGV, that's probably a bug in the backtrace printer for
Guile.  Sorry about that.  Thanks for the info.

     Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]