Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] csbeats segfault

Date2012-05-29 13:19
FromFrancois PINOT
SubjectRe: [Cs-dev] csbeats segfault
AttachmentsNone  None  
Tito's solution is working here. Bravo!

Francois


It works with 64bit (glibc-2.11.1) and segfault with 32bit.
It is a possible solution in beats.h:

   typedef struct {
     int n;                    /* self referencial */
     double *p;
     int largest;
   } INSTR;

tito

On Tue, May 29, 2012 at 09:54:34AM +0100, jpff@cs.bath.ac.uk wrote:
> It is the example from the manual I have been using
>
> No crash here (OpenSuse11.4 on x86_64) but I will keep looking.  I did
> find a nasty in instruments over 10 and fixed it (I thought).
> ==John
>
> > Hello John,
> >
> > I ran csbeats with the test.cs file that is within the source code
> > directory, and it worked fine. So it seems that the problem is with the
> > manual example. Could you please run the manual example on your system to
> > see if you get a segment fault?
> >
> > Regards
> >
> > Francois
> >
> >
> >
> >> I found a typo/braino in the extending of the maximum instrument.
> >> Fixed in git.  Trouble I am having is that it does not fail for me
> >> yet.  The bug as too small a malloc so that could explain it.
> >>
> >> ==John ffitch
> >>
> >>
> > ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats.
> > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

------------------------------

_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


End of Csound-devel Digest, Vol 73, Issue 46
********************************************



Date2012-05-29 14:16
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] csbeats segfault
Can anyone explain why this changes anything?


> Tito's solution is working here. Bravo!
>
> Francois
>
>
> It works with 64bit (glibc-2.11.1) and segfault with 32bit.
>> It is a possible solution in beats.h:
>>
>>    typedef struct {
>>      int n;                    /* self referencial */
>>      double *p;
>>      int largest;
>>    } INSTR;
>>
>> tito
>>
>> On Tue, May 29, 2012 at 09:54:34AM +0100, jpff@cs.bath.ac.uk wrote:
>> > It is the example from the manual I have been using
>> >
>> > No crash here (OpenSuse11.4 on x86_64) but I will keep looking.  I did
>> > find a nasty in instruments over 10 and fixed it (I thought).
>> > ==John
>> >
>> > > Hello John,
>> > >
>> > > I ran csbeats with the test.cs file that is within the source code
>> > > directory, and it worked fine. So it seems that the problem is with
>> the
>> > > manual example. Could you please run the manual example on your
>> system
>> to
>> > > see if you get a segment fault?
>> > >
>> > > Regards
>> > >
>> > > Francois
>> > >
>> > >
>> > >
>> > >> I found a typo/braino in the extending of the maximum instrument.
>> > >> Fixed in git.  Trouble I am having is that it does not fail for me
>> > >> yet.  The bug as too small a malloc so that could explain it.
>> > >>
>> > >> ==John ffitch
>> > >>
>> > >>
>> > >
>> -


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-05-29 14:17
FromTito Latini
SubjectRe: [Cs-dev] csbeats segfault
AttachmentsNone  

Date2012-05-29 14:21
FromTito Latini
SubjectRe: [Cs-dev] csbeats segfault
AttachmentsNone  

Date2012-05-29 15:03
FromTito Latini
SubjectRe: [Cs-dev] csbeats segfault
AttachmentsNone  

Date2012-05-29 15:34
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] csbeats segfault
Can I have a less cryptic explanation.  As far as I can see the change was
to swap two fields in a struct.  I cannot see how that changes anything
other than (invisible) layout.

If you are saying that it is a fenceposts -- count from zero -- I can
blieve it is possible
==John

>> Can anyone explain why this changes anything?
>
> implementation of `malloc'
>
> PS  the second solution seems better
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-05-29 20:48
FromTito Latini
SubjectRe: [Cs-dev] csbeats segfault
AttachmentsNone  

Date2012-05-31 11:13
FromTito Latini
SubjectRe: [Cs-dev] csbeats segfault
AttachmentsNone  None  
Definitively fixed in git. It works with

i100 m1 b1 q mp D3
i101 m1 b1 q mp D3
i102    b4      E4
i103 m5 b2 e    F6
i104 m8 b1 e    F5
i105 m8 b1 e    F5
i106 m8 b1 e    F5
i107 m8 b1 e    F5
i108 m8 b1 e    F5
i109 m8 b1 e    F5
i110 m8 b1 e    F5
i111 m8 b1 e    F5
i112 m8 b1 e    F5
i113 m8 b1 e    F5
i200 m8 b1 e    F5
i229 m8 b1 e    F5

and with

i11 m1 b1 q mp D3
i12 m1 b1 q mp D3
i13 m1 b1 q mp D3
...
...
i298 m1 b1 q mp D3
i299 m1 b1 q mp D3
i300 m1 b1 q mp D3

tito


Date2012-05-31 11:36
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] csbeats segfault
> Definitively fixed in git.

I was thinking of rewriting this area of code to use a list of used
opcodes rather than a vector of the largest, as typically there are not
that many instruments and it seems clearer to me
==John



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-05-31 11:42
FromTito Latini
SubjectRe: [Cs-dev] csbeats segfault
AttachmentsNone  

Date2012-05-31 11:46
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] csbeats segfault
Just what I thought.  Will make the change

>> I was thinking of rewriting this area of code to use a list of used
>> opcodes rather than a vector of the largest, as typically there are not
>> that many instruments and it seems clearer to me
>> ==John
>
> yes, it is better, I don't like the current method with the vector
> because it uses too memory.
>
> tito
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net