-
Notifications
You must be signed in to change notification settings - Fork 10
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
clone mg_ptr for magic #25
Conversation
Handle mg_ptr to avoid to share it with other PVs.
@HaraldJoerg Thank you for reporting! Clone 0.42 should hit your friendly CPAN mirror any moment now :) |
Newxz(mg_ptr, mg->mg_len+1, char); /* add +1 for the NULL at the end? */ | ||
Copy(mg->mg_ptr, mg_ptr, mg->mg_len, char); | ||
} | ||
} else if (mg->mg_len == HEf_SVKEY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that we have no unit tests to cover this part...
/* let's share the SV for now */ | ||
SvREFCNT_inc((SV*)mg->mg_ptr); | ||
/* maybe we also want to clone the SV... */ | ||
//if (mg_ptr) mg->mg_ptr = (char*) sv_clone((SV*)mg->mg_ptr, hseen, -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this is what we should prefer doing, the current solution above just do one SvRefCnt++
Hey @atoomic! Looks like we broke Geo::Address::Formatter 😱 https://rt.cpan.org/Ticket/Display.html?id=130195 Could you maybe take a look and see if we can fix it? If you have the time, of course! |
interesting, I will have a look at this
thanks for the update
…On Mon, Jul 29, 2019 at 12:59 PM Breno G. de Oliveira < ***@***.***> wrote:
Hey @atoomic <https://github.com/atoomic>! Looks like we broke
Geo::Address::Formatter 😱
https://rt.cpan.org/Ticket/Display.html?id=130195
Could you maybe take a look and see if we can fix it? If you have the
time, of course!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25?email_source=notifications&email_token=AADC6IQ2IJGN7AKBI5ZAUVTQB44XJA5CNFSM4IEKEY32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3BVYSI#issuecomment-516119625>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADC6IR4DKHRG4SX3V3T2CLQB44XJANCNFSM4IEKEY3Q>
.
|
This is going to be fixed via #26
Not sure if I can do a release of it, @garu can you review and publish a
release?
thanks
nicolas
…On Mon, Jul 29, 2019 at 12:59 PM Breno G. de Oliveira < ***@***.***> wrote:
Hey @atoomic <https://github.com/atoomic>! Looks like we broke
Geo::Address::Formatter 😱
https://rt.cpan.org/Ticket/Display.html?id=130195
Could you maybe take a look and see if we can fix it? If you have the
time, of course!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25?email_source=notifications&email_token=AADC6IQ2IJGN7AKBI5ZAUVTQB44XJA5CNFSM4IEKEY32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3BVYSI#issuecomment-516119625>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADC6IR4DKHRG4SX3V3T2CLQB44XJANCNFSM4IEKEY3Q>
.
|
While you're at it: I stumbled over another segfault problem when a structure happened to contain a DBI database handle. On Linux, the demo attached dies with Clone 0.41 and Clone 0.42, while it seems to work on Windows. Cloning database handles is, of course, veeery suspicious (and should not have happened in my code in the first place), but some sort of safeguarding in Clone would be nice. |
Any chance you could report that as a GitHub ticket, with what would be
nice a simple script to reproduce the error?
Any chance this is related to #17
thanks in advance
nicolas
…On Mon, Jul 29, 2019 at 1:36 PM Harald Jörg ***@***.***> wrote:
While you're at it: I stumbled over another segfault problem when a
structure happened to contain a DBI database handle. On Linux, the demo
attached dies with Clone 0.41 and Clone 0.42, while it seems to work on
Windows.
Cloning database handles is, of course, veeery suspicious (and should not
have happened in my code in the first place), but some sort of safeguarding
in Clone would be nice.
dbhclone.txt <https://github.com/garu/Clone/files/3444009/dbhclone.txt>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25?email_source=notifications&email_token=AADC6IXBXC2U7LY6UAIWDQLQB5BCPA5CNFSM4IEKEY32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3BY2GQ#issuecomment-516132122>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADC6ISOHQUTNQECPZD3TGTQB5BCPANCNFSM4IEKEY3Q>
.
|
Sure, will report an issue. The relation to #17 is probably just what's given there as a root cause: "Database handles can't be cloned". |
ok I realized I've permissions to publish Clone,
I've just uploaded an updated version of Clone 0.43 to CPAN,
it should be available in the next minutes.
Please confirm that this is fixing your issue.
sincerely
nicolas
…On Mon, Jul 29, 2019 at 1:35 PM Nicolas R. ***@***.***> wrote:
This is going to be fixed via #26
Not sure if I can do a release of it, @garu can you review and publish a
release?
thanks
nicolas
On Mon, Jul 29, 2019 at 12:59 PM Breno G. de Oliveira <
***@***.***> wrote:
> Hey @atoomic <https://github.com/atoomic>! Looks like we broke
> Geo::Address::Formatter 😱
>
> https://rt.cpan.org/Ticket/Display.html?id=130195
>
> Could you maybe take a look and see if we can fix it? If you have the
> time, of course!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#25?email_source=notifications&email_token=AADC6IQ2IJGN7AKBI5ZAUVTQB44XJA5CNFSM4IEKEY32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3BVYSI#issuecomment-516119625>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AADC6IR4DKHRG4SX3V3T2CLQB44XJANCNFSM4IEKEY3Q>
> .
>
|
Handle mg_ptr to avoid to share it with other PVs.