develooper Front page | perl.perl5.porters | Postings from March 2000

re: perl 5.6.RC2 pp_sys.c problem (AIX

David R. Favor
March 15, 2000 07:08
re: perl 5.6.RC2 pp_sys.c problem (AIX
Message ID:
High weirdness abounds... I am totally confused about what is suppose to
be happening here:

When I replace the code in pp_sys.c with the following and run it (outside dbx):

            /* See the note at doio.c:do_print about filesize limits. --jhi */
            int fn = PerlIO_fileno(IoIFP(io));
            Off_t ilen = 1943;
            length = PerlLIO_write(fn, buffer+offset, ilen);
            printf("fn=%d buffer=%X offset=%d isize=%d ilen=%d osize=%d olen=%d\n",
                    fn,    buffer,  offset, sizeof(ilen), ilen, sizeof(length), length);

I get the following output:

   dgsp>cat ~/bin/junker
   #!/rpm/BUILD/perl-5.6.0-RC2/miniperl -I/rpm/BUILD/perl-5.6.0-RC2/lib

   use File::Copy;

   print "pid is $$\n";

   pid is 23330
   fn=4 buffer=20035ED8 offset=0 isize=0 ilen=8 osize=0 olen=1943

The fileno is correct, but I'm unsure what I'm seeing for the other values.
It's as if the stack is corrupt and the printf() values are shifted some way.

Suggestions? Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About