linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Martin Costabel <costabel@wanadoo.fr>
To: Tom Rini <tmrini@ntplx.net>
Cc: linuxppc-dev@lists.linuxppc.org, bug-gnuplot@dartmouth.edu
Subject: [Patch] linuxppc gnuplot segfaults in save
Date: Thu, 15 Apr 1999 00:27:54 +0200	[thread overview]
Message-ID: <3715166A.FD1AF78F@wanadoo.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]

Hi, 

I think I sent this already to the LinuxPPC developers some time ago,
but I had a look into the latest gnuplot-3.7-2.ppc.rpm, and the bug is
still there:

Bug: 
gnuplot-3.7 on LinuxPPC gives a segmentation fault when the command
'save' or 'save set' is used.

Repeat by: 
root[88]#/usr/bin/gnuplot

        G N U P L O T
        Linux version 3.7
        patchlevel 0
        last modified Thu Jan 14 19:34:53 BST 1999
etc.

Terminal type set to 'x11'
gnuplot> save 'foo.gnu'
Segmentation fault

Patch: 
See below. One just has to split an fprintf command into two.
It seems that the fprintf in the LinuxPPC libraries does not support
such long format strings. In gnuplot-3.6, at the corresponding place
there were 10 fprintf commands, one for each line.

In principle, it would be nice if this were included in the gnuplot
sources, but since it seems to be a ppc specific problem, it would be
sufficient to include the patch in the gnuplot-3.7-x.src.rpm for
LinuxPPC (Tom?). 

Or could someone find out what's wrong with the fprintf function in
LinuPPC? Note that this is not specific for one version of glibc. I
tried it on several from glibc-961212 to glibc-2.1.1-3a. Same result.

--
Martin

[-- Attachment #2: gnuplot_save.patch --]
[-- Type: text/plain, Size: 738 bytes --]

--- misc.c.ori	Thu Dec 10 19:33:22 1998
+++ misc.c	Sun Feb  7 00:16:08 1999
@@ -645,17 +645,18 @@
 set pointsize %g\n\
 set encoding %s\n\
 set %spolar\n\
-set %sparametric\n\
+set %sparametric\n",
+	    loff, roff, toff, boff,
+	    pointsize,
+	    encoding_names[encoding],
+	    (polar) ? "" : "no",
+	    (parametric) ? "" : "no");
+    fprintf(fp, "\
 set view %g, %g, %g, %g\n\
 set samples %d, %d\n\
 set isosamples %d, %d\n\
 set %ssurface\n\
 set %scontour",
-	    loff, roff, toff, boff,
-	    pointsize,
-	    encoding_names[encoding],
-	    (polar) ? "" : "no",
-	    (parametric) ? "" : "no",
 	    surface_rot_x, surface_rot_z, surface_scale, surface_zscale,
 	    samples_1, samples_2,
 	    iso_samples_1, iso_samples_2,

             reply	other threads:[~1999-04-14 22:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-14 22:27 Martin Costabel [this message]
1999-04-14 23:13 ` [Patch] linuxppc gnuplot segfaults in save Tom Rini
1999-04-15  6:54   ` Martin Costabel
1999-04-15  9:16     ` Franz Sirl
1999-04-15 10:47       ` Lars Hecking
1999-04-15 10:55       ` Martin Costabel
1999-04-19 18:52         ` Troy Benjegerdes
1999-04-15 12:28       ` Gabriel Paubert
1999-04-15 14:07         ` Franz Sirl
1999-04-15 16:54           ` Gabriel Paubert
1999-04-15 11:56     ` Gary Thomas
1999-04-15  7:05 ` Hans-Bernhard Broeker
1999-04-15  7:58   ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
1999-04-15 19:00 Dean Luick
1999-04-15 20:34 ` [Patch]linuxppc " David Edelsohn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3715166A.FD1AF78F@wanadoo.fr \
    --to=costabel@wanadoo.fr \
    --cc=bug-gnuplot@dartmouth.edu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=tmrini@ntplx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).