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

Already on GitHub? Sign in to your account

Preserve call stack in cloned interpreter #10

merged 1 commit into from Oct 23, 2012


None yet
2 participants

frett commented Oct 15, 2012

In perl 5.14 threaded mode doesn't work in Fuse. It appears the issue is caused after the interpreter has been cloned when call_sv is triggered. A quick fix is to add the CLONEf_COPY_STACKS flag to the perl_clone call.

Because of that I'm guessing it something with how an empty stack is treated in a new interpreter in perl 5.14. There were several fixes with addressing memory leaks of lexicals when creating a new interpreter. I would guess the call_sv is referencing a function that has now been freed in the latest version of perl, but keeping the existing call stack prevents the function from being freed.

I'm not completely sure the ramifications of keeping the stack in all cloned interpreters would be at cleanup time, but we already currently ignore clean-up of created interpreters once the mount point is unmounted. At some point work needs to be done to clean up our threads and variables when unmounting, at that point CLONEf_COPY_STACKS will probably need to be re-evaluated.


frett commented Oct 15, 2012

I tested this patch on perl 5.10.1, 5.12.4, and 5.14.2

dpavlin added a commit that referenced this pull request Oct 23, 2012

Merge pull request #10 from frett/master
Preserve call stack in cloned interpreter

@dpavlin dpavlin merged commit 89fefac into dpavlin:master Oct 23, 2012

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