[reportlab-users] pyRXP - strange non-deterministic errors on python 2.7 and 64-bit Linux

Robin Becker robin at reportlab.com
Wed May 18 13:16:56 EDT 2011


OK this is the errant code in url.c

p=merged_path

.....

fprintf(stderr," 261: merged_path=%s i=%d j=%d p[i+1]=%c\n",
merged_path,i,j,p[i+1]);
/* Do we have "." ? */

if(j - i == 2 && p[i+1] == '.')
{fprintf(stderr," 265: p+i+1=%s p+j=%s
(&p[i+1]-&p[0])=%d\n", p+i+1,p+j,&p[i+1]-&p[0]);
strcpy(&p[i+1], p[j] ? &p[j+1] : &p[j]);
fprintf(stderr," 267: merged_path=%s\n", merged_path);



the x32code produces these lines
261:
merged_path=/home/robin/aaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/./second-longer-file.xml
i=76 j=78 p[i+1]=.
265: p+i+1=./second-longer-file.xml p+j=/second-longer-file.xml
(&p[i+1]-&p[0])=77
267:
merged_path=/home/robin/aaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/second-longer-file.xml



261:
merged_path=/home/robin/aaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/./second-longer-file.xml
i=76 j=78 p[i+1]=.
265: p+i+1=./second-longer-file.xml p+j=/second-longer-file.xml
(&p[i+1]-&p[0])=77
267:
merged_path=/home/robin/aaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/secd-longer-fifile.xml


so the error appears to be in strcpy; not sure if that's rxp's fault or not any
ideas?

--
Robin Becker


More information about the reportlab-users mailing list