Csound Csound-dev Csound-tekno Search About

[Cs-dev] Possible bug?

Date2014-04-26 18:48
Fromjpff@cs.bath.ac.uk
Subject[Cs-dev] Possible bug?
AttachmentsNone  

Date2014-04-26 19:43
FromSteven Yi
SubjectRe: [Cs-dev] Possible bug?
Hi John,

Could you post the orc/sco/csd here?

steven

On Sat, Apr 26, 2014 at 1:48 PM,   wrote:
>
> I was trying to run Josep's clarinet example nd it crashes
>
> Program received signal SIGSEGV, Segmentation fault.
> deltapn (csound=, p=0x894598)
>       at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
> 569             ar[n] = *tap;
> (gdb) where
> #0  deltapn (csound=, p=0x894598)
>       at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
> #1  0x00007ffff7a924bc in kperf_nodebug (csound=0x604010)
>       at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1533
> #2  0x00007ffff7a9378e in csoundPerform (csound=csound@entry=0x604010)
>       at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1966
> #3  0x000000000040140d in main (argc=, argv=0x7fffffffdef8)
>       at
> /home/jpff/Sourceforge/csound/New/csound6/frontends/csound/csound_main.c:135
> (gdb) print *tap
> Cannot access memory at address 0x4008950d8
>
> It is in "int deltapn(CSOUND *csound, DELTAP *p)" and the problem may
> be kr=sr.  Not looked very closely but I do not know this code
>
> ==John ff
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-26 19:56
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
Past the fencepost bug? Looks like it.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 18:48, jpff@cs.bath.ac.uk wrote:

> 
> I was trying to run Josep's clarinet example nd it crashes
> 
> Program received signal SIGSEGV, Segmentation fault.
> deltapn (csound=, p=0x894598)
>      at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
> 569             ar[n] = *tap;
> (gdb) where
> #0  deltapn (csound=, p=0x894598)
>      at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
> #1  0x00007ffff7a924bc in kperf_nodebug (csound=0x604010)
>      at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1533
> #2  0x00007ffff7a9378e in csoundPerform (csound=csound@entry=0x604010)
>      at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1966
> #3  0x000000000040140d in main (argc=, argv=0x7fffffffdef8)
>      at
> /home/jpff/Sourceforge/csound/New/csound6/frontends/csound/csound_main.c:135
> (gdb) print *tap
> Cannot access memory at address 0x4008950d8
> 
> It is in "int deltapn(CSOUND *csound, DELTAP *p)" and the problem may
> be kr=sr.  Not looked very closely but I do not know this code
> 
> ==John ff
> 
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-26 20:39
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
Attachmentsclarinet_macros.zip  None  None  
The attached code also segfaults, but it appears to be something happening in the parser:

(lldb) bt
* thread #1: tid = 0x346966, 0x00007fff8e493eca libsystem_c.dylib`flockfile + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68)
  * frame #0: 0x00007fff8e493eca libsystem_c.dylib`flockfile + 18
    frame #1: 0x00007fff8e495c06 libsystem_c.dylib`fread + 31
    frame #2: 0x00000001001884cc CsoundLib64`yy_get_next_buffer(yyscanner=0x000000010114df80) + 652 at csound_prelex.c:2308
    frame #3: 0x0000000100185ee7 CsoundLib64`comment [inlined] input(yyscanner=0x000000010114df80) + 157 at csound_prelex.c:2475
    frame #4: 0x0000000100185e4a CsoundLib64`comment(yyscanner=0x000000010114df80) + 10 at csound_pre.lex:698
    frame #5: 0x0000000100181a69 CsoundLib64`csound_prelex(csound=, yyscanner=0x000000010114df80) + 2617 at csound_pre.lex:176
    frame #6: 0x0000000100196c09 CsoundLib64`csoundParseOrc(csound=0x0000000100801200, str=) + 505 at new_orc_parser.c:177
    frame #7: 0x000000010019600c CsoundLib64`csoundCompileOrc(csound=0x0000000100801200, str=) + 12 at csound_orc_compile.c:1680
    frame #8: 0x0000000100101bc4 CsoundLib64`csoundCompileArgs(csound=0x0000000100801200, argc=, argv=) + 1124 at main.c:234
    frame #9: 0x0000000100102509 CsoundLib64`csoundCompile(csound=0x0000000100801200, argc=, argv=) + 9 at main.c:490
    frame #10: 0x0000000100001cf2 csound`main(argc=2, argv=0x00007fff5fbff9c8) + 450 at csound_main.c:133
    frame #11: 0x0000000100001b24 csound`start + 52


========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 19:56, Victor Lazzarini  wrote:

> Past the fencepost bug? Looks like it.
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
> 
> 
> 
> 
> On 26 Apr 2014, at 18:48, jpff@cs.bath.ac.uk wrote:
> 
>> 
>> I was trying to run Josep's clarinet example nd it crashes
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> deltapn (csound=, p=0x894598)
>>     at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
>> 569             ar[n] = *tap;
>> (gdb) where
>> #0  deltapn (csound=, p=0x894598)
>>     at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
>> #1  0x00007ffff7a924bc in kperf_nodebug (csound=0x604010)
>>     at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1533
>> #2  0x00007ffff7a9378e in csoundPerform (csound=csound@entry=0x604010)
>>     at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1966
>> #3  0x000000000040140d in main (argc=, argv=0x7fffffffdef8)
>>     at
>> /home/jpff/Sourceforge/csound/New/csound6/frontends/csound/csound_main.c:135
>> (gdb) print *tap
>> Cannot access memory at address 0x4008950d8
>> 
>> It is in "int deltapn(CSOUND *csound, DELTAP *p)" and the problem may
>> be kr=sr.  Not looked very closely but I do not know this code
>> 
>> ==John ff
>> 
>> 
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2014-04-26 21:01
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
The problem seems to be when the last element of the macro text is a comment and there is no newline:

#define header(rate'zak) #sr   = $rate. kr   = $rate.
ksmps= 1
zakinit $zak.,$zak.; locations 0,1,2 & 3#

==> segfault

#define header(rate'zak) #sr   = $rate. kr   = $rate.
ksmps= 1
zakinit $zak.,$zak.; locations 0,1,2 & 3
#

==> is OK.

Anyway, after fixing this, there are no further crashes. Maybe this is not the clarinet code in question?

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 20:39, Victor Lazzarini  wrote:

> The attached code also segfaults, but it appears to be something happening in the parser:
> 
> (lldb) bt
> * thread #1: tid = 0x346966, 0x00007fff8e493eca libsystem_c.dylib`flockfile + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68)
>  * frame #0: 0x00007fff8e493eca libsystem_c.dylib`flockfile + 18
>    frame #1: 0x00007fff8e495c06 libsystem_c.dylib`fread + 31
>    frame #2: 0x00000001001884cc CsoundLib64`yy_get_next_buffer(yyscanner=0x000000010114df80) + 652 at csound_prelex.c:2308
>    frame #3: 0x0000000100185ee7 CsoundLib64`comment [inlined] input(yyscanner=0x000000010114df80) + 157 at csound_prelex.c:2475
>    frame #4: 0x0000000100185e4a CsoundLib64`comment(yyscanner=0x000000010114df80) + 10 at csound_pre.lex:698
>    frame #5: 0x0000000100181a69 CsoundLib64`csound_prelex(csound=, yyscanner=0x000000010114df80) + 2617 at csound_pre.lex:176
>    frame #6: 0x0000000100196c09 CsoundLib64`csoundParseOrc(csound=0x0000000100801200, str=) + 505 at new_orc_parser.c:177
>    frame #7: 0x000000010019600c CsoundLib64`csoundCompileOrc(csound=0x0000000100801200, str=) + 12 at csound_orc_compile.c:1680
>    frame #8: 0x0000000100101bc4 CsoundLib64`csoundCompileArgs(csound=0x0000000100801200, argc=, argv=) + 1124 at main.c:234
>    frame #9: 0x0000000100102509 CsoundLib64`csoundCompile(csound=0x0000000100801200, argc=, argv=) + 9 at main.c:490
>    frame #10: 0x0000000100001cf2 csound`main(argc=2, argv=0x00007fff5fbff9c8) + 450 at csound_main.c:133
>    frame #11: 0x0000000100001b24 csound`start + 52
> 
> 
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
> 
> 
> 
> 
> On 26 Apr 2014, at 19:56, Victor Lazzarini  wrote:
> 
>> Past the fencepost bug? Looks like it.
>> ========================
>> Dr Victor Lazzarini
>> Senior Lecturer
>> NUI Maynooth, Ireland
>> victor dot lazzarini at nuim dot ie
>> 
>> 
>> 
>> 
>> On 26 Apr 2014, at 18:48, jpff@cs.bath.ac.uk wrote:
>> 
>>> 
>>> I was trying to run Josep's clarinet example nd it crashes
>>> 
>>> Program received signal SIGSEGV, Segmentation fault.
>>> deltapn (csound=, p=0x894598)
>>>    at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
>>> 569             ar[n] = *tap;
>>> (gdb) where
>>> #0  deltapn (csound=, p=0x894598)
>>>    at /home/jpff/Sourceforge/csound/New/csound6/OOps/ugens6.c:569
>>> #1  0x00007ffff7a924bc in kperf_nodebug (csound=0x604010)
>>>    at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1533
>>> #2  0x00007ffff7a9378e in csoundPerform (csound=csound@entry=0x604010)
>>>    at /home/jpff/Sourceforge/csound/New/csound6/Top/csound.c:1966
>>> #3  0x000000000040140d in main (argc=, argv=0x7fffffffdef8)
>>>    at
>>> /home/jpff/Sourceforge/csound/New/csound6/frontends/csound/csound_main.c:135
>>> (gdb) print *tap
>>> Cannot access memory at address 0x4008950d8
>>> 
>>> It is in "int deltapn(CSOUND *csound, DELTAP *p)" and the problem may
>>> be kr=sr.  Not looked very closely but I do not know this code
>>> 
>>> ==John ff
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-26 21:43
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Possible bug?
AttachmentsNone  clarinet.orc  clarinet.sco  None  None  

Date2014-04-26 22:48
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
taps are not checked for bounds, are they? I seem to have come across a similar problem recently, but I
did not follow it up. Maybe we need to check.

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:

> 


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-26 22:52
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
Also this line:

idelsmps = (int32)delsmps;

shouldn’t idelsmps be int64, if delsmps is double?

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:

> 


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-26 23:13
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
I think the if(...) should be replaced by while(...)

        if (UNLIKELY(tap >= endp ))
          tap -= q->npts;
        if (UNLIKELY(tap < begp))
          tap += q->npts;

…

        while (UNLIKELY(tap >= endp ))
          tap -= q->npts;
        while (UNLIKELY(tap < begp))
          tap += q->npts;


========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 22:52, Victor Lazzarini  wrote:

> Also this line:
> 
> idelsmps = (int32)delsmps;
> 
> shouldn’t idelsmps be int64, if delsmps is double?
> 
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
> 
> 
> 
> 
> On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:
> 
>> 
> 
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-26 23:58
FromMichael Gogins
SubjectRe: [Cs-dev] Possible bug?
AttachmentsNone  None  
This is better but if tp is far more than endp or far less than begp, it will eat time.

Regards,
Mike


-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Apr 26, 2014 at 6:13 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I think the if(...) should be replaced by while(...)

        if (UNLIKELY(tap >= endp ))
          tap -= q->npts;
        if (UNLIKELY(tap < begp))
          tap += q->npts;



        while (UNLIKELY(tap >= endp ))
          tap -= q->npts;
        while (UNLIKELY(tap < begp))
          tap += q->npts;


========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 22:52, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:

> Also this line:
>
> idelsmps = (int32)delsmps;
>
> shouldn’t idelsmps be int64, if delsmps is double?
>
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
>
>
>
>
> On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:
>
>> <clarinet.orc>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2014-04-27 00:15
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
if it is far more, the program will likely segfault with if().
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 26 Apr 2014, at 23:58, Michael Gogins  wrote:

> This is better but if tp is far more than endp or far less than begp, it will eat time.
> 
> Regards,
> Mike
> 
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Sat, Apr 26, 2014 at 6:13 PM, Victor Lazzarini  wrote:
> I think the if(...) should be replaced by while(...)
> 
>         if (UNLIKELY(tap >= endp ))
>           tap -= q->npts;
>         if (UNLIKELY(tap < begp))
>           tap += q->npts;
> 
> …
> 
>         while (UNLIKELY(tap >= endp ))
>           tap -= q->npts;
>         while (UNLIKELY(tap < begp))
>           tap += q->npts;
> 
> 
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
> 
> 
> 
> 
> On 26 Apr 2014, at 22:52, Victor Lazzarini  wrote:
> 
> > Also this line:
> >
> > idelsmps = (int32)delsmps;
> >
> > shouldn’t idelsmps be int64, if delsmps is double?
> >
> > ========================
> > Dr Victor Lazzarini
> > Senior Lecturer
> > NUI Maynooth, Ireland
> > victor dot lazzarini at nuim dot ie
> >
> >
> >
> >
> > On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:
> >
> >> 
> >
> >
> > ------------------------------------------------------------------------------
> > Start Your Social Network Today - Download eXo Platform
> > Build your Enterprise Intranet with eXo Platform Software
> > Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> > Get Started Now And Turn Your Intranet Into A Collaboration Platform
> > http://p.sf.net/sfu/ExoPlatform
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-27 17:34
FromSteven Yi
SubjectRe: [Cs-dev] Possible bug?
Just FYI, I tried this with CS6 and get a crash with deltapn.
Interstingly, with Csound 5.19.02 doubles version, I also get a crash
with deltapn. With CS6 in XCode, building a Debug version, I get no
crash (no sound either, just 0.0 amps).

On Sat, Apr 26, 2014 at 7:15 PM, Victor Lazzarini
 wrote:
> if it is far more, the program will likely segfault with if().
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
>
>
>
>
> On 26 Apr 2014, at 23:58, Michael Gogins  wrote:
>
>> This is better but if tp is far more than endp or far less than begp, it will eat time.
>>
>> Regards,
>> Mike
>>
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Sat, Apr 26, 2014 at 6:13 PM, Victor Lazzarini  wrote:
>> I think the if(...) should be replaced by while(...)
>>
>>         if (UNLIKELY(tap >= endp ))
>>           tap -= q->npts;
>>         if (UNLIKELY(tap < begp))
>>           tap += q->npts;
>>
>> …
>>
>>         while (UNLIKELY(tap >= endp ))
>>           tap -= q->npts;
>>         while (UNLIKELY(tap < begp))
>>           tap += q->npts;
>>
>>
>> ========================
>> Dr Victor Lazzarini
>> Senior Lecturer
>> NUI Maynooth, Ireland
>> victor dot lazzarini at nuim dot ie
>>
>>
>>
>>
>> On 26 Apr 2014, at 22:52, Victor Lazzarini  wrote:
>>
>> > Also this line:
>> >
>> > idelsmps = (int32)delsmps;
>> >
>> > shouldn’t idelsmps be int64, if delsmps is double?
>> >
>> > ========================
>> > Dr Victor Lazzarini
>> > Senior Lecturer
>> > NUI Maynooth, Ireland
>> > victor dot lazzarini at nuim dot ie
>> >
>> >
>> >
>> >
>> > On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:
>> >
>> >> 
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Start Your Social Network Today - Download eXo Platform
>> > Build your Enterprise Intranet with eXo Platform Software
>> > Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> > Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> > http://p.sf.net/sfu/ExoPlatform
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform_______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-dev

Date2014-04-27 19:11
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Possible bug?
AttachmentsNone  

Date2014-04-27 19:12
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Possible bug?
AttachmentsNone  

Date2014-04-27 19:20
FromSteven Yi
SubjectRe: [Cs-dev] Possible bug?
I tried with --old-parser and got the same crash.

On Sun, Apr 27, 2014 at 2:12 PM,   wrote:
> Does it crash in old parser?
>
>
>
>
>
> Quoting Steven Yi :
>
>> Just FYI, I tried this with CS6 and get a crash with deltapn.
>> Interstingly, with Csound 5.19.02 doubles version, I also get a crash
>> with deltapn. With CS6 in XCode, building a Debug version, I get no
>> crash (no sound either, just 0.0 amps).
>>
>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-27 19:28
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
because it’s a memory problem, sometimes it does not show up, but if you could run with valgrind it would see
the error. In my opinion, the deltapn code is unsafe (the pointer can be beyond the delay memory, as it’s not protected for that).


========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 27 Apr 2014, at 17:34, Steven Yi  wrote:

> Just FYI, I tried this with CS6 and get a crash with deltapn.
> Interstingly, with Csound 5.19.02 doubles version, I also get a crash
> with deltapn. With CS6 in XCode, building a Debug version, I get no
> crash (no sound either, just 0.0 amps).
> 
> On Sat, Apr 26, 2014 at 7:15 PM, Victor Lazzarini
>  wrote:
>> if it is far more, the program will likely segfault with if().
>> ========================
>> Dr Victor Lazzarini
>> Senior Lecturer
>> NUI Maynooth, Ireland
>> victor dot lazzarini at nuim dot ie
>> 
>> 
>> 
>> 
>> On 26 Apr 2014, at 23:58, Michael Gogins  wrote:
>> 
>>> This is better but if tp is far more than endp or far less than begp, it will eat time.
>>> 
>>> Regards,
>>> Mike
>>> 
>>> 
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Sat, Apr 26, 2014 at 6:13 PM, Victor Lazzarini  wrote:
>>> I think the if(...) should be replaced by while(...)
>>> 
>>>        if (UNLIKELY(tap >= endp ))
>>>          tap -= q->npts;
>>>        if (UNLIKELY(tap < begp))
>>>          tap += q->npts;
>>> 
>>> …
>>> 
>>>        while (UNLIKELY(tap >= endp ))
>>>          tap -= q->npts;
>>>        while (UNLIKELY(tap < begp))
>>>          tap += q->npts;
>>> 
>>> 
>>> ========================
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> NUI Maynooth, Ireland
>>> victor dot lazzarini at nuim dot ie
>>> 
>>> 
>>> 
>>> 
>>> On 26 Apr 2014, at 22:52, Victor Lazzarini  wrote:
>>> 
>>>> Also this line:
>>>> 
>>>> idelsmps = (int32)delsmps;
>>>> 
>>>> shouldn’t idelsmps be int64, if delsmps is double?
>>>> 
>>>> ========================
>>>> Dr Victor Lazzarini
>>>> Senior Lecturer
>>>> NUI Maynooth, Ireland
>>>> victor dot lazzarini at nuim dot ie
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:
>>>> 
>>>>> 
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Start Your Social Network Today - Download eXo Platform
>>>> Build your Enterprise Intranet with eXo Platform Software
>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>> http://p.sf.net/sfu/ExoPlatform
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> ------------------------------------------------------------------------------
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform_______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-27 19:33
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Possible bug?
AttachmentsNone  

Date2014-04-27 19:57
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Possible bug?
AttachmentsNone  

Date2014-04-27 19:59
FromSteven Yi
SubjectRe: [Cs-dev] Possible bug?
As a sidenote, I ran the testCsoundCatalog.py script in
csound6/tests/commandline/testCsoundCatalog.py.  I got:

TESTS COMPLETE:
    SUCCESS    1187
    FAIL    56
    TOTAL    1243

This only does syntax checking, not runtime. Something else we should
investigate.

On Sun, Apr 27, 2014 at 2:57 PM,   wrote:
> I valgrind nothing shows until the crash point
>
> new alloc for instr 2:
> ==24362== Invalid read of size 8
> ==24362==    at 0x4EF62A2: deltapn (ugens6.c:569)
> ==24362==    by 0x4F8B27B: kperf_nodebug (csound.c:1533)
> ==24362==    by 0x4F8C54D: csoundPerform (csound.c:1966)
> ==24362==    by 0x40140C: main (csound_main.c:135)
> ==24362==  Address 0x4175f78c8 is not stack'd, malloc'd or (recently) free'd
> ==24362==
> Csound tidy up: Segmentation fault
>
> It is the unpoliced inf value
>
> Quoting Victor Lazzarini :
>
>> because it?s a memory problem, sometimes it does not show up, but if
>> you could run with valgrind it would see
>> the error. In my opinion, the deltapn code is unsafe (the pointer
>> can be beyond the delay memory, as it?s not protected for that).
>>
>>
>> ========================
>> Dr Victor Lazzarini
>> Senior Lecturer
>> NUI Maynooth, Ireland
>> victor dot lazzarini at nuim dot ie
>>
>>
>>
>>
>> On 27 Apr 2014, at 17:34, Steven Yi  wrote:
>>
>>> Just FYI, I tried this with CS6 and get a crash with deltapn.
>>> Interstingly, with Csound 5.19.02 doubles version, I also get a crash
>>> with deltapn. With CS6 in XCode, building a Debug version, I get no
>>> crash (no sound either, just 0.0 amps).
>>>
>>> On Sat, Apr 26, 2014 at 7:15 PM, Victor Lazzarini
>>>  wrote:
>>>> if it is far more, the program will likely segfault with if().
>>>> ========================
>>>> Dr Victor Lazzarini
>>>> Senior Lecturer
>>>> NUI Maynooth, Ireland
>>>> victor dot lazzarini at nuim dot ie
>>>>
>>>>
>>>>
>>>>
>>>> On 26 Apr 2014, at 23:58, Michael Gogins  wrote:
>>>>
>>>>> This is better but if tp is far more than endp or far less than
>>>>> begp, it will eat time.
>>>>>
>>>>> Regards,
>>>>> Mike
>>>>>
>>>>>
>>>>> -----------------------------------------------------
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> On Sat, Apr 26, 2014 at 6:13 PM, Victor Lazzarini
>>>>>  wrote:
>>>>> I think the if(...) should be replaced by while(...)
>>>>>
>>>>>        if (UNLIKELY(tap >= endp ))
>>>>>          tap -= q->npts;
>>>>>        if (UNLIKELY(tap < begp))
>>>>>          tap += q->npts;
>>>>>
>>>>> ?
>>>>>
>>>>>        while (UNLIKELY(tap >= endp ))
>>>>>          tap -= q->npts;
>>>>>        while (UNLIKELY(tap < begp))
>>>>>          tap += q->npts;
>>>>>
>>>>>
>>>>> ========================
>>>>> Dr Victor Lazzarini
>>>>> Senior Lecturer
>>>>> NUI Maynooth, Ireland
>>>>> victor dot lazzarini at nuim dot ie
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 26 Apr 2014, at 22:52, Victor Lazzarini
>>>>>  wrote:
>>>>>
>>>>>> Also this line:
>>>>>>
>>>>>> idelsmps = (int32)delsmps;
>>>>>>
>>>>>> shouldn?t idelsmps be int64, if delsmps is double?
>>>>>>
>>>>>> ========================
>>>>>> Dr Victor Lazzarini
>>>>>> Senior Lecturer
>>>>>> NUI Maynooth, Ireland
>>>>>> victor dot lazzarini at nuim dot ie
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:
>>>>>>
>>>>>>> 
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Start Your Social Network Today - Download eXo Platform
>>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>>> http://p.sf.net/sfu/ExoPlatform
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Start Your Social Network Today - Download eXo Platform
>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>> http://p.sf.net/sfu/ExoPlatform
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Start Your Social Network Today - Download eXo Platform
>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>> http://p.sf.net/sfu/ExoPlatform_______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Start Your Social Network Today - Download eXo Platform
>>>> Build your Enterprise Intranet with eXo Platform Software
>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>> http://p.sf.net/sfu/ExoPlatform
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>> ------------------------------------------------------------------------------
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-27 20:19
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible bug?
But the problem is that the code allows a large value to be passed as a delay position unchecked, which is
why I think it is unsafe.

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 27 Apr 2014, at 19:57, jpff@cs.bath.ac.uk wrote:

> I valgrind nothing shows until the crash point
> 
> new alloc for instr 2:
> ==24362== Invalid read of size 8
> ==24362==    at 0x4EF62A2: deltapn (ugens6.c:569)
> ==24362==    by 0x4F8B27B: kperf_nodebug (csound.c:1533)
> ==24362==    by 0x4F8C54D: csoundPerform (csound.c:1966)
> ==24362==    by 0x40140C: main (csound_main.c:135)
> ==24362==  Address 0x4175f78c8 is not stack'd, malloc'd or (recently) free'd
> ==24362==
> Csound tidy up: Segmentation fault
> 
> It is the unpoliced inf value
> 
> Quoting Victor Lazzarini :
> 
>> because it?s a memory problem, sometimes it does not show up, but if  
>> you could run with valgrind it would see
>> the error. In my opinion, the deltapn code is unsafe (the pointer  
>> can be beyond the delay memory, as it?s not protected for that).
>> 
>> 
>> ========================
>> Dr Victor Lazzarini
>> Senior Lecturer
>> NUI Maynooth, Ireland
>> victor dot lazzarini at nuim dot ie
>> 
>> 
>> 
>> 
>> On 27 Apr 2014, at 17:34, Steven Yi  wrote:
>> 
>>> Just FYI, I tried this with CS6 and get a crash with deltapn.
>>> Interstingly, with Csound 5.19.02 doubles version, I also get a crash
>>> with deltapn. With CS6 in XCode, building a Debug version, I get no
>>> crash (no sound either, just 0.0 amps).
>>> 
>>> On Sat, Apr 26, 2014 at 7:15 PM, Victor Lazzarini
>>>  wrote:
>>>> if it is far more, the program will likely segfault with if().
>>>> ========================
>>>> Dr Victor Lazzarini
>>>> Senior Lecturer
>>>> NUI Maynooth, Ireland
>>>> victor dot lazzarini at nuim dot ie
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 26 Apr 2014, at 23:58, Michael Gogins  wrote:
>>>> 
>>>>> This is better but if tp is far more than endp or far less than  
>>>>> begp, it will eat time.
>>>>> 
>>>>> Regards,
>>>>> Mike
>>>>> 
>>>>> 
>>>>> -----------------------------------------------------
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>> 
>>>>> 
>>>>> On Sat, Apr 26, 2014 at 6:13 PM, Victor Lazzarini  
>>>>>  wrote:
>>>>> I think the if(...) should be replaced by while(...)
>>>>> 
>>>>>       if (UNLIKELY(tap >= endp ))
>>>>>         tap -= q->npts;
>>>>>       if (UNLIKELY(tap < begp))
>>>>>         tap += q->npts;
>>>>> 
>>>>> ?
>>>>> 
>>>>>       while (UNLIKELY(tap >= endp ))
>>>>>         tap -= q->npts;
>>>>>       while (UNLIKELY(tap < begp))
>>>>>         tap += q->npts;
>>>>> 
>>>>> 
>>>>> ========================
>>>>> Dr Victor Lazzarini
>>>>> Senior Lecturer
>>>>> NUI Maynooth, Ireland
>>>>> victor dot lazzarini at nuim dot ie
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 26 Apr 2014, at 22:52, Victor Lazzarini  
>>>>>  wrote:
>>>>> 
>>>>>> Also this line:
>>>>>> 
>>>>>> idelsmps = (int32)delsmps;
>>>>>> 
>>>>>> shouldn?t idelsmps be int64, if delsmps is double?
>>>>>> 
>>>>>> ========================
>>>>>> Dr Victor Lazzarini
>>>>>> Senior Lecturer
>>>>>> NUI Maynooth, Ireland
>>>>>> victor dot lazzarini at nuim dot ie
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 26 Apr 2014, at 21:43, jpff@cs.bath.ac.uk wrote:
>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Start Your Social Network Today - Download eXo Platform
>>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>>> http://p.sf.net/sfu/ExoPlatform
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Start Your Social Network Today - Download eXo Platform
>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>> http://p.sf.net/sfu/ExoPlatform
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Start Your Social Network Today - Download eXo Platform
>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>> http://p.sf.net/sfu/ExoPlatform_______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Start Your Social Network Today - Download eXo Platform
>>>> Build your Enterprise Intranet with eXo Platform Software
>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>> http://p.sf.net/sfu/ExoPlatform
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> ------------------------------------------------------------------------------
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net