Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Perl and OSF/1
@ 1994-08-08 18:29 Matt Cable
  1994-08-09 14:33 ` Frank Wortner
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Cable @ 1994-08-08 18:29 UTC (permalink / raw)



Allright folks...got another question for you all.



I've compiled perl succesfully on out OSF/1 1.3 machine, with only one error during compilation:

`sh  cflags eval.o` eval.c
          CCCMD =  cc -c -Olimit 2900 -D__STDC__ -DLANGUAGE_C -O  
/usr/lib/cmplrs/cc/cfe: Warning: eval.c, line 1674: Incompatible pointer type as
signment
        value = (double) time(((long*)0));
        -----------------------^

Despite this, a make test gives no errors and all tests succeed.

however, when attempting to run man-pl with this new perl, it seg faults before compilation is complete, thereby killing any hopes of running perl in debug mode to figure out the problem.  All other scripts I've tried have worked, and man-pl works fine on other systems I'm working on.  I compiled perl with -D__STDC__ as recommended to me after earlier problems, but it seems the problem still remains.  Anyone have any ideas why this might be and what I can do to fix it?

Thanks!

---
   -matt

			      E Pluribus Unix
      Matthew Cable // mcable@musketeers.tufts.edu // wozz@phantom.com
   GCS/GMU d+(-) h+ s++:++ g+ p? au a- w+ v C+++ ULS+++ P++++ L++ 3- N++ K 
      !W M+ V-- po Y+ t+ 5 j r v+ b+ D+ b--- e+ u++(**) h++ f+ r n- y+ 





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Perl and OSF/1
  1994-08-08 18:29 Perl and OSF/1 Matt Cable
@ 1994-08-09 14:33 ` Frank Wortner
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Wortner @ 1994-08-09 14:33 UTC (permalink / raw)



In article <Cu8BD6.4uu@news.tufts.edu>, mcable@musketeers.tufts.edu (Matt Cable) writes:
|>
|>Allright folks...got another question for you all.
|>
|>
|>
|>I've compiled perl succesfully on out OSF/1 1.3 machine, with only one error during compilation:
|>
|>`sh  cflags eval.o` eval.c
|>          CCCMD =  cc -c -Olimit 2900 -D__STDC__ -DLANGUAGE_C -O  
|>/usr/lib/cmplrs/cc/cfe: Warning: eval.c, line 1674: Incompatible pointer type as
|>signment
|>        value = (double) time(((long*)0));
|>        -----------------------^

Change the (long *) to a (time_t *).

|>Despite this, a make test gives no errors and all tests succeed.

Yeah, since the null pointer is never dereferenced, the fact that it's
pointing to an object of the wrong size doesn't matter.  Of course, that's
an accident of implementation.  :-)

|>however, when attempting to run man-pl with this new perl, it seg faults before compilation is complete, thereby killing any hopes of running perl in debug mode to figure out the problem.  All other scripts I've tried have worked, and man-pl works fine on other systems I'm working on.  I compiled perl with -D__STDC__ as recommended to me after earlier problems, but it seems the problem still remains.  Anyone have any ideas why this might be and what I can do to fix it?
|>

The problem is in the hash routines in hash.c.  Here's a patch you
can apply.  I found this problem a while ago, since I also use the
PERL man program.

rcsdiff -c -r1.1 -r1.2 hash.c
===================================================================
RCS file: RCS/hash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -c -r1.1 -r1.2
*** 1.1 1994/05/31 14:53:32
--- 1.2 1994/08/05 18:31:02
***************
*** 6,11 ****
--- 6,14 ----
   *    License or the Artistic License, as specified in the README file.
   *
   * $Log: hash.c,v $
+  * Revision 1.2  1994/08/05  18:31:02  frank
+  * Added explict checks for non-zero to hash functions.
+  *
+  * Revision 1.1  1994/05/31  14:53:32  frank
+  * Initial revision
   *
***************
*** 75,81 ****
       * same letter don't have to be strEQ'ed within hfetch(), since it
       * compares hash values before trying strEQ().
       */
!     if (!tb->tbl_coeffsize)
        hash = *key + 128 * key[1] + 128 * key[klen-1]; /* assuming klen > 0 */
      else {    /* use normal coefficients */
        if (klen < tb->tbl_coeffsize)
--- 78,84 ----
       * same letter don't have to be strEQ'ed within hfetch(), since it
       * compares hash values before trying strEQ().
       */
!     if (!tb->tbl_coeffsize && klen > 0)
        hash = *key + 128 * key[1] + 128 * key[klen-1]; /* assuming klen > 0 */
      else {    /* use normal coefficients */
        if (klen < tb->tbl_coeffsize)
***************
*** 144,150 ****
      if (hash)
        /*SUPPRESS 530*/
        ;
!     else if (!tb->tbl_coeffsize)
        hash = *key + 128 * key[1] + 128 * key[klen-1];
      else {    /* use normal coefficients */
        if (klen < tb->tbl_coeffsize)
--- 147,153 ----
      if (hash)
        /*SUPPRESS 530*/
        ;
!     else if (!tb->tbl_coeffsize && klen > 0)
        hash = *key + 128 * key[1] + 128 * key[klen-1];
      else {    /* use normal coefficients */
        if (klen < tb->tbl_coeffsize)
***************
*** 232,238 ****

      if (!tb || !tb->tbl_array)
        return Nullstr;
!     if (!tb->tbl_coeffsize)
        hash = *key + 128 * key[1] + 128 * key[klen-1];
      else {    /* use normal coefficients */
        if (klen < tb->tbl_coeffsize)
--- 235,241 ----

      if (!tb || !tb->tbl_array)
        return Nullstr;
!     if (!tb->tbl_coeffsize && klen > 0)
        hash = *key + 128 * key[1] + 128 * key[klen-1];
      else {    /* use normal coefficients */
        if (klen < tb->tbl_coeffsize)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-08-09 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-08-08 18:29 Perl and OSF/1 Matt Cable
1994-08-09 14:33 ` Frank Wortner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox