FAQ
Just a quick question about DBIh_SET_ERR_SV. I've produced a patch for
DBD::Oracle and it failing to handle non-unicode strings but running our
test code against DBI 1.609 produces a segfault. It appears:

DBIh_SET_ERR_SV(h, imp_xxh, errcode_sv, errstr_sv, &sv_undef , &sv_undef);

works fine and

DBIh_SET_ERR_SV(h, imp_xxh, errcode_sv, errstr_sv, Nullsv, Nullsv);

does not, no doubt due to the following code in set_err_sv:

if (SvREADONLY(state)) state = sv_mortalcopy(state);

Is that right as they seem inconsistent?

Martin

Search Discussions

  • Tim Bunce at Jul 28, 2009 at 10:49 pm

    On Tue, Jul 28, 2009 at 07:06:50PM +0100, Martin J. Evans wrote:
    Just a quick question about DBIh_SET_ERR_SV. I've produced a patch for
    DBD::Oracle and it failing to handle non-unicode strings but running our
    test code against DBI 1.609 produces a segfault. It appears:

    DBIh_SET_ERR_SV(h, imp_xxh, errcode_sv, errstr_sv, &sv_undef , &sv_undef);

    works fine and

    DBIh_SET_ERR_SV(h, imp_xxh, errcode_sv, errstr_sv, Nullsv, Nullsv);

    does not, no doubt due to the following code in set_err_sv:

    if (SvREADONLY(state)) state = sv_mortalcopy(state);

    Is that right as they seem inconsistent?
    Some bits of perl internals check for null pointers and others don't.

    Looks like set_err_sv() assumes it won't be given null pointers.
    So don't do that :)

    I'll tweak the docs in DBI::DBD.

    Tim.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbi-dev @
categoriesperl
postedJul 28, '09 at 6:07p
activeJul 28, '09 at 10:49p
posts2
users2
websitedbi.perl.org

2 users in discussion

Tim Bunce: 1 post Martin J. Evans: 1 post

People

Translate

site design / logo © 2019 Grokbase