Skip Menu |
 

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 128956
Status: open
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: khw [...] cpan.org
Cc: CAC [...] cpan.org
AdminCc:

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



Subject: Parameter size mismatch causes segfaults
Download (untitled) / with headers
text/plain 1.1k
In working on fixing a core perl5 bug affecting Tk, I had to make several changes to get Tk to work on a 64 bit system. These stemmed from the fact that size_t is 8 bytes on this system, and int is 4. Most of these were involved in calling Tcl_GetStringFromObj(). The length parameter really should be a size_t or ssize_t, and in a few places it is. But the function declares it to be an int, and various callers attempt to cast their size_t* variables to int*. THIS DOES NOT WORK. It may compile, but the value returned will be garbage. Most places have the parameter declared to be an int, and this appears to work. But that int may overflow on 64 bit systems, so they all should be converted to size_t or ssize_t. Because I was only interested in cobbling together something that I could use temporarily, I converted everything to int's, which was enough to get me by. I am attaching my changes to this ticket. Another place where there was a pointer parameter length mismatch is in the call to SvPV at line 630 in objGlue.c Compiling this with a recent gcc version raised many more warnings, some of which looked really serious.
Subject: objGlue.o
Download objGlue.o
application/x-object 1.4m

Message body not shown because it is not plain text.

It looks like this ticket is an accidental duplicate of #128955. Should this ticket be deleted, since the other is the one with all the attachments?
Download (untitled) / with headers
text/plain 221b
On Sat May 11 17:46:07 2019, CAC wrote: Show quoted text
> It looks like this ticket is an accidental duplicate of #128955. Should this > ticket be deleted, since the other is the one with all the attachments?
Yes, delete this. Sorry


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.