maintainer-feedback requested: [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
otacilio.neto at bsd.com.br has reassigned Bugzilla Automation
<bugzilla at FreeBSD.org>'s request for maintainer-feedback to vbox at FreeBSD.org:
Bug 214396: emulators/virtualbox-ose-additions Minimalist program crashes after
end main() execution.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214396
--- Description ---
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/Gu
estHost/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;
}
More information about the freebsd-emulation
mailing list