Menu ▾ ▴

#2195 html fails to compile on mipsel platform

None
closed
nobody
None
2019-09-15
2019-09-01
AntonG
No

In Debian we have found that the documentation compilation on the platform mipsel fails with the segmentation fault:

GNUPLOT_LIB=../../../demo gdb --args ../src/gnuplot -e "winhelp=1;" ../../../docs/plotstyles.gnu

GDB:

Starting program: /home/gladk/04/gnuplot-5.2.7+dfsg1/debian/build-x11/src/gnuplot -e winhelp=1\; ../../../docs/plotstyles.gnu
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/mipsel-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x5557a1fc in polar_to_xy (theta=0, r=3, x=0x7fff42a0, y=0x7fff42a8, update=true) at ../../../src/axis.c:2752
2752        } else if (r >= R_AXIS.min) {
#0  0x5557a1fc in polar_to_xy (theta=0, r=3, x=0x7fff42a0, y=0x7fff42a8, update=true) at ../../../src/axis.c:2752
#1  0x555ed8a4 in eval_plots () at ../../../src/plot2d.c:3187
#2  0x555867d0 in plot_command () at ../../../src/command.c:1850
#3  0x55589330 in command () at ../../../src/command.c:629
#4  0x55589330 in do_line () at ../../../src/command.c:419
#5  0x555d2e08 in load_file (fp=0x55743150, name=<optimized out>, calltype=<optimized out>) at ../../../src/misc.c:449
#6  0x5557405c in main (argc=1, argv=0x7fff4630) at ../../../src/plot.c:661
#0  0x5557a1fc in polar_to_xy (theta=0, r=3, x=0x7fff42a0, y=0x7fff42a8, update=true) at ../../../src/axis.c:2752
        status = INRANGE
#1  0x555ed8a4 in eval_plots () at ../../../src/plot2d.c:3187
        y = 0
        theta = 0
        x = 0
        temp = 3
        a = {type = CMPLX, v = {int_val = 0, cmplx_val = {real = 3, imag = 0}, string_val = 0x0, data_array = 0x0, value_array = 0x0}}
        t = 0
        at_ptr = 0x55a45cf8
        name_str = <optimized out>
        sample_range_token = 0
        t_min = 0
        t_max = 6.2831853071795862
        t_step = 0.063466518254339258
        i = 0
        this_plot = <optimized out>
        tp_ptr = <optimized out>
        uses_axis = {(unknown: 0), USES_AXIS_FOR_FUNC, USES_AXIS_FOR_FUNC, (unknown: 0), (unknown: 0), (unknown: 0), (unknown: 0), (unknown: 0), (unknown: 0), (unknown: 1996234272), (unknown: 0)}
        some_functions = true
        some_tables = false
        plot_num = 1
        line_num = <optimized out>
        was_definition = false
        pattern_num = 0
        xtitle = 0x0
        begin_token = 1
        start_token = 1
        end_token = <optimized out>
        orig_dummy_var = "t\000sU\000\000\000\000\232\\vU\000\377\276c\001\000\000\000\000\000sU\234\363rU\240rmUH\\vUQ\000\000\000\231\\vU\200\363rU(ev"
        nbins = 0
        binlow = <optimized out>
        binhigh = <optimized out>
        binwidth = <optimized out>
        newhist_start = <optimized out>
        histogram_sequence = -1
        newhist_color = <optimized out>
        newhist_pattern = -5
#2  0x555867d0 in plot_command () at ../../../src/command.c:1850
#3  0x55589330 in command () at ../../../src/command.c:629
        inlptr = <optimized out>
#4  0x55589330 in do_line () at ../../../src/command.c:419
        inlptr = <optimized out>
#5  0x555d2e08 in load_file (fp=0x55743150, name=<optimized out>, calltype=<optimized out>) at ../../../src/misc.c:449
        len = 94
        start = <optimized out>
        left = <optimized out>
        more = <optimized out>
        stop = <optimized out>
        gpval_lineno = 0x5576ac38
#6  0x5557405c in main (argc=1, argv=0x7fff4630) at ../../../src/plot.c:661
        i = <optimized out>

Discussion

  • Ethan Merritt

    Ethan Merritt - 2019-09-03

    This trace does not make sense to me.
    The code lines highlighted are:

       } else if (r >= R_AXIS.min) {
            /* We store internally as if plotting r(theta) - rmin */
            r = r - R_AXIS.min;
    

    R_AXIS is a static global structure that has been accessed repeatedly in the immediately preceding code, so I don't see any way it could cause a segfault here. r is a parameter to this routine so I would expect it to be on the stack (but I don't know mipsel compiler calling conventions so maybe not). Could the compiler somehow be setting a read-only flag that prevents modifying a local parameter?

     

    Last edit: Ethan Merritt 2019-09-04
  • Ethan Merritt

    Ethan Merritt - 2019-09-04

    Does this problem also manifest when building the pdf documentation?

    The subject line of this report seems to imply that the error was encountered while trying to build the html documentation. The html output is, I believe, still used for the Windows help system. But this is not expected to work on linux, though of course a segfault is always bad and may indicate a more general problem. It used to be that linux html documentation was produced indirectly via "makeinfo --html", but support for texinfo/makeinfo as a build target was dropped from the main gnuplot package long ago. There is still a makefile rule for "make html" that tries to use latex2html, but this has never worked correctly for me and is not enabled by default.

     
  • AntonG

    AntonG - 2019-09-04

    Exactly the same is happening with pdf-generation. I assume that it can be a bug in newer compiler version.

     
  • Ethan Merritt

    Ethan Merritt - 2019-09-15

    Acknowledged as a bug in gcc 9.something rather than in the gnuplot code.

     
  • Ethan Merritt

    Ethan Merritt - 2019-09-15
    • status: open --> closed
    • Group: -->
    • Priority: -->
     

Log in to post a comment.