discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] crashes, memory errors and valgrind


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] crashes, memory errors and valgrind
Date: Tue, 5 Jun 2012 19:12:40 -0400

On Tue, Jun 5, 2012 at 10:06 AM, Patrick Strasser
<address@hidden> wrote:
> Tom Rondeau wrote on 2012-06-04 14:18:
>> On Sun, Jun 3, 2012 at 2:22 PM, Patrick Strasser
>> <address@hidden> wrote:
>>> Hi Tom,
>>>
>>> Tom Rondeau wrote on 2012-06-03 17:12:
>>>> On Sat, Jun 2, 2012 at 5:50 AM, Patrick Strasser
>>>> Patrick,
>>>>
>>>> It looks like you're problem is in the rational_resampler code. I
>>>> wonder if there's something about the resampling rate being used
>>>> that's causing something to go out of bounds here. Can you dig into
>>>> the code and figure out what interpolation and decimation rates are
>>>> being used?
>>>
>>> Interpolation is 1, decimation is 2.
>
>>> Full valgrind log in
>>> http://pastebin.com/7GCs3bWy
>>
>> I was hoping you'd say the interpolation and/or decimation were some
>> ridiculously large numbers. Since the block is only actually
>> decimating, could you replace it in the code with an fir_filter_fff
>> (or fft_filter_fff) just for testing purposes? That'll help us see if
>> it's the rational resampler itself or something more general.
>
> What seems strange to me is the allocation of a buffer of a non by 8
> dividable size, that is accessed in blocks of 8 bytes. So the last read
> always either does not touch the end of the buffer, or it reads beyond
> the end.

Sorry, Patrick, I think there was a typo or something in your first
sentence, and I'm not sure I understood. But from the gist of it, yes,
if the items used in a block have size 8, then the buffer allocation
should be sized enough to handle an integer number of items. This is
true because the scheduler sends the block noutput_items, which are
the number of items to process (so the buffer size would be
8*noutput_items).

> I'm a little sparse at time until Sunday evening. I tried to write some
> mini program starting from dial_tone.cc which uses a filter, have to
> convince cmake to compile it... learning ;-)
>
> Regards
>
> Patrick

Thanks. Let us know how it goes.

Tom



reply via email to

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