Crash is called: Bus error (core dumped)

Bug #80828 reported by yasser el-hawari
8
Affects Status Importance Assigned to Milestone
gnuplot (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gnuplot

Gnuplot crashed reproducible. Version: gnuplot 4.0 patchlevel 0, Edgy Eft.

== The file I was working on: ==
f(x) = v*x/(k+x)
fit f(x) 'gnuplot.data' via v,k
plot 'gnuplot.data' with points, f(x)

#set terminal postscript
#set output "zzz.ps"
#replot

== The data-file: ==
12.5 0.2
25 0.4
50 0.8
100 1.4
200 1.8
400 1.9

Revision history for this message
ville palo (vi64pa) wrote :

Didn't happen on my i386 edgy

Revision history for this message
William Grant (wgrant) wrote :

I'm unable to reproduce this, but here's the stacktrace generated from the crash report:

 #0 0x080dd0e6 in X11_make_palette (palette=0x81133d0) at ../term/x11.trm:1296
 No locals.
 #1 0x08085808 in eval_plots () at plot2d.c:1482
  r = <value optimized out>
  t = <value optimized out>
  x = 0
  y = 0
  yp = <value optimized out>
  i = 135467984
  this_plot = (struct curve_points *) 0x95c
  tp_ptr = (struct curve_points **) 0x81313d0
  uses_axis = {135466144, 3, 3, 1717986918, 320, 0, 0, 0, 0, 0, 0}
  some_functions = 1
  plot_num = 2
  line_num = 2
  point_num = 1
  xparam = 0
  pattern_num = 0
  xtitle = 0x0
  begin_token = 1
  __PRETTY_FUNCTION__ = "eval_plots"
 #2 0x08052827 in define () at command.c:486
  at_tmp = (struct at_type *) 0x812d050
  save_dummy = {"\000y@ffffffþ?", '\0' <repeats 39 times>,
   "@\016\023\b \f\023\b\003\000\000\000\003\000\000\000ffff@\001", '\0' <repeats 26 times>, "\001\000",
   '\0' <repeats 15 times>, "ð?\000\000\000\000\000\000ð?\000ïÏ·\001\000\000\000£\237i@Û\031\000@\000\000\000\000\000\000\000\000òì",
   "\016\b\v\000\000\000\200\f\023\b\000\004\000\000\002\000\000\000\000\000\000\000\000\000y@\000\000\000\000\000\000)@(\030ª¿\000\004\000\000PÐ\022\b$\000\000\000(",
   "\030ª¿\000\004\000\000PÐ\022\b$\000\000\000X\030ª¿'(\005\bàŠ\017\b\000\000\000\000ÿ\003\000\000\n\000\000\000PÐ\022\b\000\000\000\000°\026Œ·"}
  start_token = 36
  udv = <value optimized out>
 #3 0x0807b7fd in MousePosToGraphPosReal (xx=<value optimized out>, yy=1, x=0x24, y=0x8130750, x2=0x8130740, y2=0x0)
     at mouse.c:305
 No locals.
 #4 0x080518d8 in save_command () at command.c:1231
  fp = (FILE *) 0xbfaa18c0
  save_file = 0x0
  what = 135450704
 #5 0x08052827 in define () at command.c:486
  at_tmp = (struct at_type *) 0x0
  save_dummy = {
   "\f\023\b\000\004\000\000\002\000\000\000\000\000\000\000\000\000y@\000\000\000\000\000\000)@(\030ª¿\000\004\000\000PÐ\022\b$\000\000\000(\030ª¿\000\004\000",
   "PÐ\022\b$\000\000\000X\030ª¿'(\005\bàŠ\017\b\000\000\000\000ÿ\003\000\000\n\000\000\000PÐ\022\b\000\000\000\000°\026Œ·\000\004\000\000&\000",
   "\000$\000\000\000\230\030ª¿ý·\a\bPÐ\022\b\000\004\000\000P\a\023\b\210µ\a\b@\a\023\b\032\005\020\b\230\030ª\000P\a\023\b\000\000\000\000\032\005",
   "\020\b@\a\023\bÀ\030ª¿PÐ\022\b\016\a\023\bÈ\030ª¿Ø\030\005\bP\a\023\b@\a\023\b\000\000\000\000\213g\n\b\000\000\000\000@\235\017\bò",
   "\003\000\000\000\000\000\000@\a\023\b\000\000\000\000ø\030ª¿'(\005\bàŠ\017\b\000\000\000\000\000\004\000\000\000\a\023\bPÐ\022\b8í\016\b\000\000\000"}
  start_token = 135464718
  udv = <value optimized out>
 #6 0x080533a6 in help_command () at command.c:2042
  len = 135464718
  only = 8
  subtopics = 191
  help_ptr = 0x0
  helpbuf = 0x0
  prompt = 0x0
  toplevel = 0
 #7 0x080818b5 in main (argc=1, argv=<value optimized out>) at plot.c:586
  i = 0
 #8 0xb7be48cc in ?? ()
 #9 0x00000001 in ?? ()
 #10 0xbfaa1b84 in ?? ()
 #11 0xbfaa1b8c in ?? ()
 #12 0xb7f58878 in ?? ()
 #13 0x00000000 in ?? ()

description: updated
Revision history for this message
William Grant (wgrant) wrote :

After using gdb on the core dump, there is code preventing this crash, like so:

1291 if( !X11_ipc ) {
1292 fprintf(stderr, "(X11_make_palette) 0 == X11_ipc\n");
1293 return -1;
1294 }
1295
1296 fprintf( X11_ipc, "%c %c %c %c %d\n",

The problem here is that X11_ipc is null, so fprintf segfaults... However, surely line 1291 should have caught that? Apparently not...

Revision history for this message
William Grant (wgrant) wrote : Re: [Bug 80828] Re: Crash is called: Bus error (core dumped)

William Grant wrote:
> After using gdb on the core dump, there is code preventing this crash,
> like so:
>
> 1291 if( !X11_ipc ) {
> 1292 fprintf(stderr, "(X11_make_palette) 0 == X11_ipc\n");
> 1293 return -1;
> 1294 }
> 1295
> 1296 fprintf( X11_ipc, "%c %c %c %c %d\n",
>
> The problem here is that X11_ipc is null, so fprintf segfaults...
> However, surely line 1291 should have caught that? Apparently not...

... except that it's SIGBUS, not SIGSEGV. Silly me.

Revision history for this message
Nicola Ferralis (feranick) wrote :

I cannot reproduce on hardy (GnuPlot 4.2.3). Everything works as expected. Nominating for Invalid.

Revision history for this message
arno_b (arno.b) wrote :

Works fin for me on hardy too.
So set to invalid.
Feel free to reopen it if necessary.

Changed in gnuplot:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.