Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack smashing crash on certain code #422

Closed
sensestage opened this issue Aug 24, 2012 · 3 comments
Closed

stack smashing crash on certain code #422

sensestage opened this issue Aug 24, 2012 · 3 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
Milestone

Comments

@sensestage
Copy link
Contributor

The code below (mainly the line w.(name ++ "_buf").asSymbol.bufnum ) segfaults sclang.
The code though obviously wrong, should not crash sclang.

Bug occurs on 64bit linux, build from the 3..5.3 package.

w = ();

~createTraceRecorder = { |name,buffersize,input,index=0|
w.put( (name ++ "_buf").asSymbol, Buffer.alloc( s, buffersize, 1 ) );
Ndef( name, {
var inputChan = Ndef( \input ).kr.dump;
Demand.kr(
Impulse.kr( \recrate.kr(5) ),
0,
Dbufwr(
Ndef( input ).kr,
\recordbuf.kr( w.(name ++ "_buf").asSymbol.bufnum ),
Dseq( (0..buffersize),inf)
)
);
});
};

~createTraceRecorder.value( \plrec, 128, \pitchLow )

Instance of OutputProxy { (0xc0bd2b0, gc=EC, fmt=00, flg=00, set=04)
instance variables [11]
synthDef : instance of ProxySynthDef (0xb188c930, size=19, set=5)
inputs : nil
rate : Symbol 'control'
synthIndex : Integer 0
specialIndex : Integer 0
antecedents : nil
descendants : nil
widthFirstAntecedents : nil
source : instance of In (0xc9c14d0, size=9, set=4)
outputIndex : Integer 0
name : nil
}
ERROR: Message 'bufnum' not understood.
RECEIVER:
*** stack smashing detected ***: /usr/local/bin/sclang terminated

*** SCLang segmentation fault ***

@timblechmann
Copy link
Contributor

haven't been able to reproduce it.
would you be able to provide a backtrace?

@sensestage
Copy link
Contributor Author

Maybe, ... I'll check. Tomorrow at the earliest though.

@sensestage
Copy link
Contributor Author

I can't reproduce the crash anymore in the latest master, so I assume it is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
Projects
None yet
Development

No branches or pull requests

2 participants