[Bug 214396] emulators/virtualbox-ose-additions Minimalist program crashes after end main() execution.

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Nov 10 17:20:49 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214396

            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 at FreeBSD.org
          Reporter: otacilio.neto at bsd.com.br
             Flags: maintainer-feedback?(vbox at FreeBSD.org)
          Assignee: vbox at 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"); 
    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/VBox/GuestHost/OpenGL/util/hash.c

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

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


More information about the freebsd-ports-bugs mailing list