Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloning a DBI database handle results in segfault #27

Open
HaraldJoerg opened this issue Jul 29, 2019 · 3 comments
Open

Cloning a DBI database handle results in segfault #27

HaraldJoerg opened this issue Jul 29, 2019 · 3 comments

Comments

@HaraldJoerg
Copy link

This may be related to #14 and #17, as all circle around the topic of "don't clone database handles".
The attached script segfaults on Linux (Debian stretch, Perl 5.28).
I don't mind if Clone::clone dies if it detects a database handle, but it should somehow safeguard against segfaults.
dbhclone.txt

@atoomic
Copy link
Collaborator

atoomic commented Jul 29, 2019

I agree with you if this is unsupported we should try to detect and croak when someone clones a dbh... this would protects against such errors in the future

@garu
Copy link
Owner

garu commented Jul 29, 2019

I agree, but I think Cloning database handles should be supported if at all possible. The original author considered this a bug, so I think we should too, unless it's really not something anyone should do.

@atoomic
Copy link
Collaborator

atoomic commented Jul 30, 2019

Having on our roadmap a plan to support forking Database Handlers, does not block us to detect such a clone and trap this with an error like Forking DBH is currently not supported and prevent a SegFault.

Of course if we can come with a patch to support it in a short time, than that warning message becomes unnecessary.

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

No branches or pull requests

3 participants