__security_init_cookie errors with glut (not a linkage error!)

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
First of all Im running Vista 64 bit and VC2008 full

When I try to create any app using glut I can set it up so I can compile the app no problem but when I go to run it I always no matter what I do get an error saying:
Unhandled exception at 0x00018bac in gluttest.exe: 0xC0000005: Access violation.

When I hit break it goes to gs_Support.c specifically this line:
    cookie = systime.ft_struct.dwLowDateTime;

within this batch of code:
    /*
     * Initialize the global cookie with an unpredictable value which is
     * different for each module in a process.  Combine a number of sources
     * of randomness.
     */

    GetSystemTimeAsFileTime(&systime.ft_struct);
#if defined (_WIN64)
    cookie = systime.ft_scalar;
#else  /* defined (_WIN64) */
    cookie = systime.ft_struct.dwLowDateTime;
    cookie ^= systime.ft_struct.dwHighDateTime;
#endif  /* defined (_WIN64) */

    cookie ^= GetCurrentProcessId();
    cookie ^= GetCurrentThreadId();
    cookie ^= GetTickCount();

    QueryPerformanceCounter(&perfctr);

This is from my call stack:
     00018bac()   
>    gluttest.exe!__security_init_cookie()  Line 131    C
     gluttest.exe!mainCRTStartup()  Line 398    C
     kernel32.dll!76d5e3f3()    


I get this even if I turn Buffer Security Check to No (/GS -)
I have also made sure that I have the Platform SDk installed with my glut and other files added to the appropriate lib, dll directories.

I have been battling this issue for months and am frustrated beyond all compare. If I work from my XP 32bit machine I dont run into this problem but now that Im back in grad school I need to be able to work off my laptop and alas its the Vista 64bit OS which is giving me these nightmares.


View the full article
 
Back
Top