Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2016 17:20:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        vbox@FreeBSD.org
Subject:   [Bug 214396] emulators/virtualbox-ose-additions Minimalist program crashes after end main() execution.
Message-ID:  <bug-214396-26505@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214396

            Bug ID: 214396
           Summary: emulators/virtualbox-ose-additions Minimalist program
                    crashes after end main() execution.
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: vbox@FreeBSD.org
          Reporter: otacilio.neto@bsd.com.br
             Flags: maintainer-feedback?(vbox@FreeBSD.org)
          Assignee: vbox@FreeBSD.org

This small program crashes when executing the return 0; line.

#include <stdio.h>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <GL/glext.h>

int main(int argc, char **argv) {

    glutInit(&argc, argv);
    glutCreateWindow("GLUT");
    glewInit();

    printf("OpenGL version supported by this platform (%s): \n",
glGetString(GL_VERSION));

    fprintf(stdout, "Exiting...\n");=20
    fflush(stdout);

    return 0;
}


To reproduce you must install virtualbox-ose-additions with opengl enabled =
and
compile (cc -I/usr/local/include -L/usr/local/lib -o testegl testegl.c -lGL
-lGLEW -lGLU   -lglut) and run this program.

After debugging gdb say that the exception is raised on line 679 of file
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-5.1.8/src/VBo=
x/GuestHost/OpenGL/util/hash.c

void *crHashtableSearch( const CRHashTable *h, unsigned long key )
{
    unsigned int index =3D crHash( key );
    CRHashNode *temp;
#ifdef CHROMIUM_THREADSAFE
bug is here  =3D=3D=3D=3D=3D=3D=3D>  crLockMutex((CRmutex *)&h->mutex);
#endif
    for ( temp =3D h->buckets[index]; temp; temp =3D temp->next )
    {
        if ( temp->key =3D=3D key )
            break;
    }
#ifdef CHROMIUM_THREADSAFE
    crUnlockMutex((CRmutex *)&h->mutex);
#endif
    if ( !temp )
    {
        return NULL;
    }
    return temp->data;
}

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214396-26505>