[M3devel] Problem interfacing C lib
Dragiša Durić
dragisha at m3w.org
Mon Mar 19 23:44:20 CET 2012
Tried that earlier… One of my first guesses. Same thing happens.
On Mar 19, 2012, at 6:47 PM, Antony Hosking wrote:
>
> On Mar 19, 2012, at 1:13 PM, Dragiša Durić wrote:
>
>> #1 0x00000035bd8172a0 in evbuffer_search_range (buffer=0x694090, what=0x7 <Address 0x7 out of bounds>, len=0, start=0x0, end=0x7fffffffdbb0)
>> at buffer.c:2441
>> #2 0x0000000000404a0c in Buffer__Search (t=<error reading variable>, pattern=<error reading variable>, from=<error reading variable>,
>> to=<error reading variable>) at ../src/Buffer.m3:150
>>
>> Buffer.m3:150
>> pos := evbuffer.search_range(t.b, LOOPHOLE(chars, ADDRESS), len, NIL, NIL);
>>
>> t.b is a pointer, so is chars… len is Utypes.size_t and it's value is 7.
>>
>> <* EXTERNAL evbuffer_search_range *>
>> PROCEDURE search_range(buf: t; what: char_star; len: size_t; start, end: UNTRACED REF ptr): ptr;
>
> I’m betting start and end should be ADDRESS, not UNTRACED REF. I am sure that they do not refer to an allocated ptr, but rather to some address within buf or char_star. Is chars an array? In which case, perhaps ADR(chars[0])?
>
>>
>> t is an ADDRESS, and so on…
>>
>> Critical Mass Modula-3 version d5.9.0
>> last updated: 2010-07-21
>> compiled: 2010-10-04 07:24:16
>> configuration: /etc/cm3.cfg
>> host: AMD64_LINUX
>> target: AMD64_LINUX
>>
>>
>> Any ideas? TIA,
>> dd
>>
>
More information about the M3devel
mailing list