[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>

Howdy,

12 messages 2006/09/09
[#8817] Re: Segfault in libc strlen, via rb_str_new2 — Eric Hodel <drbrain@...7.net> 2006/09/09

On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:

Re: 1.9 build failure.

From: Nobuyoshi Nakada <nobu@...>
Date: 2006-09-18 13:26:48 UTC
List: ruby-core #8889
Hi,

At Mon, 18 Sep 2006 22:14:48 +0900,
Hugh Sasse wrote in [ruby-core:08888]:
> Testing a patch (nowhere near digest) against the latest 1.9 on Sun
> Sparc Solaris9 I get
> 
> gcc -I. -I../.. -I../../. -I../.././ext/digest -DRUBY_EXTCONF_H=\"extconf.h\"  -fPIC -g -O2  -c digest_new.c

What's digest_new.c?

> digest_new.c: In function 'rb_digest_base_s_digest':
> digest_new.c:100: error: 'struct RString' has no member named 'ptr'
> digest_new.c:100: error: 'struct RString' has no member named 'len'

Use RSTRING_PTR(str) and RSTRING_LEN(str) instead of
RSTRING(str)->ptr and RSTRING(str)->len respectively.

-- 
Nobu Nakada

In This Thread