bug-guile
[Top][All Lists]
Advanced

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

Re: build errors: 9172 Broken pipe and 9173 Segmentation fault


From: Mark H Weaver
Subject: Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
Date: Sat, 16 Apr 2011 22:34:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Douglas Mencken <address@hidden> writes:
> #3  0x480e0f44 in scm_decoding_error (subr=<value optimized out>,
> err=38, message=<value optimized out>, port=<value optimized out>) at
> strings.c:1438
> #4  0x480e1190 in scm_from_stringn (str=0x48128754 ������, len=<value
> optimized out>, encoding=<value optimized out>, handler=<value
> optimized out>) at strings.c:1494
> #5  0x480e11e8 in scm_from_locale_stringn (str=0x48128754 ������,
> len=<value optimized out>) at strings.c:1535
> #6  0x480e7304 in scm_from_locale_symboln (sym=<value optimized out>,
> len=<value optimized out>) at symbols.c:444
> #7  0x480e7328 in scm_from_locale_symbol (sym=<value optimized out>)
> at symbols.c:438
> #8  0x48050410 in scm_init_array_handle () at array-handle.c:138

Douglas and I did some investigation over this over IRC, and discovered
that this problem is not within Guile.  On his platform (uClibc on
PowerPC, using GCC 4.6.0 and libunistring-0.9.3) u32_conv_from_encoding
does not work correctly, as demonstrated by the attached minimal C
program, which is not linked with Guile.

In particular, the following call returns NULL on his platform:

  uint32_t *result;
  size_t result_size;
  result = u32_conv_from_encoding ("ASCII", iconveh_question_mark,
                                   "a", 1,
                                   NULL, NULL, &result_size);

     Best,
      Mark


/* but first, write a little minimal C program that calls 
u32_conv_from_encoding 
 * with the same parameters used here:
 * fromcode=="ASCII", handler==iconveh_question_mark, src=="a", srclen==1, 
offsets==NULL, 
 * resultbuf==NULL, and lengthp should be a pointer to a size_t variable
 */

#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>

#include <uniconv.h>
#include <unistring/iconveh.h>

static const char a_str[] = { 0x61, 0x00 };

int
main (int argc, char *argv[])
{
  uint32_t *result;
  size_t some_size;
  
  result = u32_conv_from_encoding ("ASCII", iconveh_question_mark,
                                   a_str, 1,
                                   NULL, NULL, &some_size);

  printf ("result = %p\n", result);

  return EXIT_SUCCESS;
}

reply via email to

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