Skip to content

Fix broken set_notice_(receiver|processor) callback after GC.compact - #735

Open
larskanis wants to merge 1 commit into
ged:masterfrom
larskanis:fix-734
Open

Fix broken set_notice_(receiver|processor) callback after GC.compact#735
larskanis wants to merge 1 commit into
ged:masterfrom
larskanis:fix-734

Conversation

@larskanis

Copy link
Copy Markdown
Collaborator

The VALUE object passed to libpq was not updated at GC.compact . Instead we better pass the xmalloc'ed TDATA pointer to libpq and add the self object to the struct as a back reference. That self object is relocated at GC.compact .

Also add a test case which triggers and verifies the relocation.

Fixes #734

The `VALUE` object passed to libpq was not updated at `GC.compact` .
Instead we better pass the xmalloc'ed TDATA pointer to libpq and add the `self` object to the struct as a back reference.
That `self` object is relocated at GC.compact .

Also add a test case which triggers and verifies the relocation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set_notice_receiver/processor: raw VALUE handed to libpq breaks under GC compaction (SEGV)

1 participant