in reply to [I::C] Why does it segfault?
It looks to me like you do nothing to upgrade the bare SV to be of sufficient type to hold a PV. But then assert(SvTYPE(sv) >= SVt_PV); should have fired. But perhaps you are building in an environment that doesn't have assert()s enabled.
Also, the ref you return on the stack is not mortalized which probably means a memory leak.
Update: Yep, Eliya's reply confirms my first paragraph.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: [I::C] Why does it segfault? (NDEBUG?)
by BrowserUk (Patriarch) on Mar 15, 2012 at 06:13 UTC | |
by tye (Sage) on Mar 15, 2012 at 13:49 UTC | |
by ikegami (Patriarch) on Mar 16, 2012 at 19:53 UTC |