Bug#886496: libopengl-perl: glutTimerFunc: Segmentation fault

Salvatore Bonaccorso carnil at debian.org
Thu Jan 18 22:03:23 UTC 2018


Hi

On Sat, Jan 06, 2018 at 08:25:28PM +0100, Thomas Kremer wrote:
> Package: libopengl-perl
> Version: 0.6704+dfsg-2+b2
> Severity: normal
> 
> Dear Maintainers,
> 
> I'm getting a segmentation fault whenever a handler that was set with
> glutTimerFunc() is supposed to be executed.
> 
> Minimal example:
> 
> $ perl -e 'use OpenGL ":all"; glutInit(); glutCreateWindow("title");
> glutTimerFunc(1000,sub{}); glutMainLoop();'
> Segmentation fault
> $
> 
> For my case, I have a workaround using glutIdleFunc() instead, but
> that's not a solution for everyone.
> 
> Can you reproduce?

I have not analyzed it, but with your testcase the issue is
reproducible at least with:

----cut---------cut---------cut---------cut---------cut---------cut-----
Starting program: /usr/bin/perl -e use\ OpenGL\ \":all\"\;\ glutInit\(\)\;\ glutCreateWindow\(\"title\"\)\;\ glutTimerFunc\(1000,sub\{\}\)\;\ glutMainLoop\(\)\;
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
Perl_av_fetch (my_perl=0x555555953260, av=av at entry=0x559563d8, key=key at entry=0,
    lval=lval at entry=0) at av.c:253
253     av.c: No such file or directory.
(gdb) bt full
#0  Perl_av_fetch (my_perl=0x555555953260, av=av at entry=0x559563d8, key=key at entry=0,
    lval=lval at entry=0) at av.c:253
        neg = <optimized out>
        size = <optimized out>
#1  0x00007ffff6da27d8 in generic_glut_timer_handler (value=1435853784) at pogl_glut.xs:452
        handler_data = 0x559563d8
        handler = <optimized out>
        i = <optimized out>
        sp = 0x555555958b70
#2  0x00007ffff6628e24 in glutMainLoopEvent () from /usr/lib/x86_64-linux-gnu/libglut.so.3
No symbol table info available.
#3  0x00007ffff66296a5 in glutMainLoop () from /usr/lib/x86_64-linux-gnu/libglut.so.3
No symbol table info available.
#4  0x00007ffff6db1604 in XS_OpenGL_glutMainLoop (my_perl=<optimized out>, cv=0x555555d12c68)
    at pogl_glut.c:795
        sp = <optimized out>
        ax = 1
        mark = <optimized out>
        items = <optimized out>
#5  0x0000555555630121 in Perl_pp_entersub (my_perl=0x555555953260) at pp_hot.c:4231
        markix = 0
        is_scalar = false
        sp = <optimized out>
        sv = 0x555555d69530
        gv = 0x555555635e11 <Perl_sv_free2+97>
        cv = 0x555555d12c68
        old_savestack_ix = <optimized out>
#6  0x0000555555627f46 in Perl_runops_standard (my_perl=0x555555953260) at run.c:41
        op = <optimized out>
#7  0x00005555555a92a7 in S_run_body (oldscope=<optimized out>, my_perl=<optimized out>)
    at perl.c:2524
No locals.
#8  perl_run (my_perl=0x555555953260) at perl.c:2447
        oldscope = 1
        ret = <optimized out>
        cur_env = {je_prev = 0x5555559535e8, je_buf = {{__jmpbuf = {0, -3625254069442854471,
                93824992412608, 140737488350080, 0, 0, -7429295047078460999,
                -3625253876523744839}, __mask_was_saved = 0, __saved_mask = {__val = {
                  3329619642332573743, 808334898, 0, 0, 7165064483209180463,
                  8660248813382888545, 7596496373740942904, 3419760881481315694,
                  3615886028624258416, 3157558, 0, 93823560581120, 93824992412608,
                  997554013135027712, 0, 0}}}}, je_ret = 0, je_mustcatch = false,
          je_old_delaymagic = 0}
#9  0x00005555555803a2 in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>)
    at perlmain.c:123
        exitstatus = <optimized out>
        i = <optimized out>
(gdb)
----cut---------cut---------cut---------cut---------cut---------cut-----

Regards,
Salvatore



More information about the pkg-perl-maintainers mailing list