Configuration array is handled destructively? #2

simensen opened this Issue Jan 5, 2012 · 2 comments


None yet
2 participants

simensen commented Jan 5, 2012

I'm having an issue where the configuration argument is being handled destructively. I have a wrapper class (SundownParser) that maintains its own configuration information. If I pass that configuration array as the second argument to \Sundown constructor, the next time I create an instance of my wrapper class the configuration array has been set to a string. (Something in the stack)

Here is some info on my setup:

This is what the output looks like:

simensen commented Jan 5, 2012

Actually, I was just working on submitting another issue I'm having with a segfault. It turns out I think it is related? If I specify any value ( even an empty array() ) for the constructor, I get a segfault at the end of the script execution. If I do not pass a configuration array at all I do not get a segfault.

chobie closed this in 0b084eb Jan 6, 2012


chobie commented Jan 6, 2012

Hi Beau, Thank you reporting the issue.
for now, i've fixed this issue. it just forget to increment specified array's refcount.
probably this commit also fixed SEGV when specified variable for the constructor.

recently i'm implementing on OSX environment. sometimes OSX through memory issue (as i'm not good C programmer)
let me take a look other latent memory issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment