Giter VIP home page Giter VIP logo

Comments (3)

larskanis avatar larskanis commented on August 22, 2024 2

While writing the code for commit 5061020 , I wondered if the VALUEs have to be valid before possible creation and assigning type maps. Now I know, they have to!

I opened #531 to fix this. I'll review the other write barrier commits for similar cases now.

from ruby-pg.

stanhu avatar stanhu commented on August 22, 2024

The seg fault seems to be pointing at typemap in t_pg_result:

rb_gc_mark_movable( this->typemap );

I see RB_OBJ_WRITE is used here:

ruby-pg/ext/pg_result.c

Lines 226 to 230 in 2b87db5

RB_OBJ_WRITE(self, &this->typemap, typemap);
this->p_typemap = RTYPEDDATA_DATA( this->typemap );
this->flags = p_conn->flags;
} else {
RB_OBJ_WRITE(self, &this->typemap, pg_typemap_all_strings);

I wonder if typemap is being assigned somewhere else.

from ruby-pg.

stanhu avatar stanhu commented on August 22, 2024

Is RB_OBJ_WRITE needed here?

this->typemap.default_typemap = pg_typemap_all_strings;

Or any of these locations?

% git grep "default_typemap ="
ext/pg_type_map_by_column.c:            p_new_typemap->typemap.default_typemap = sub_typemap;
ext/pg_type_map_by_mri_type.c:  this->typemap.default_typemap = pg_typemap_all_strings;
ext/pg_type_map_by_oid.c:       p_colmap->typemap.default_typemap = pg_typemap_all_strings;
ext/pg_type_map_by_oid.c:                       p_new_typemap->typemap.default_typemap = sub_typemap;
ext/pg_type_map_by_oid.c:               p_new_typemap->typemap.default_typemap = sub_typemap;
ext/pg_type_map_in_ruby.c:      p_new_typemap->default_typemap = sub_typemap;

from ruby-pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.