Skip to content

cas value not being converted to perl correctly on 32bit system #28

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

Open
JRaspass opened this issue Oct 1, 2022 · 1 comment
Open

Comments

@JRaspass
Copy link
Owner

JRaspass commented Oct 1, 2022

Migrated from rt.cpan.org #65381 (status was 'open')

Requestors:

Attachments:

From [email protected] on 2011-02-02 20:05:27
:

When retrieving the cas value on a 32 bit machine, the value is being incorrectly converted to a
perl uv. Attached is a patch to convert it to a perl string after a gets() and then back to a long
long when calling cas(). Thank you for your work on this module!

@JRaspass
Copy link
Owner Author

JRaspass commented Oct 1, 2022

From [email protected] on 2011-02-02 20:53:20
:

On Wed Feb 02 15:05:27 2011, JGOLDBERG wrote:

Attached is a patch to convert it to a perl string after a
gets() and then back to a long long when calling cas().

Thanks for the report, looks valid. Patch is also good (would be
perfect if test case is also included). However, since the original
conversion to SvUV is wrong, this is kinda strange now that we get CAS
value over text protocol, then convert it to an integer, then again to
string. Shouldn't the fix be just to pass CAS as a string to Perl,
without intermediate ull representation? This would also have an
advantage that CAS would become completely opaque. I really appreciate
if you work on such version of the fix :).

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

1 participant