Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 94221
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: rurban [...] x-ray.at
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Support compile-time usage with perlcc
See remap-symname pull request (nee the RT # id first). Extend Encode_XSEncoding for the symbol name. Store the symbol name along the IV ptr as SVp_POK PVX. This is needed for perlcc when thawing frozen images, where an encoding object was initialized at compile-time, pointing to an extern symbol of the shared library, and need to be remapped to the new ptr at run-time. See e.g. https://rt.cpan.org/Public/Bug/Display.html?id=94069 where Net::DNS uses an encoding via use constant, causing a segfault, and https://code.google.com/p/perl-compiler/issues/detail?id=305 for the perlcc support code. Which is something along: #include <dlfcn.h> void *handle = dlopen(sofile, RTLD_NOW|RTLD_NOLOAD); void *ascii_encoding = dlsym(handle, "ascii_encoding"); SvIV_set(&sv_list[1], PTR2IV(ascii_encoding)); perlcc Detection: https://github.com/rurban/perl-compiler/blob/ce6ce452dd8fcc9bb90605dcf47489250fd540a1/lib/B/C.pm#L2545 Remapping: https://github.com/rurban/perl-compiler/blob/ce6ce452dd8fcc9bb90605dcf47489250fd540a1/lib/B/C.pm#L4851
From: rurban [...] x-ray.at
Thank you. Pulled in github. Dan the Maintainer Thereof On Wed Mar 26 14:20:49 2014, rurban@x-ray.at wrote: Show quoted text