I have Catalyst 10.7 driver installed with Ubuntu 64 bit. My video card is an Asus Radeon HD5870. When creating a 4.0 context with glXCreateContextAttribsARB the program always crash. The program I use is a slightly modified version of the code found here When I create a context that’s not exactly 4.0, the program does not crash. In fact, trying to create a 5.0 context give me :
Vendor: ATI Technologies Inc.
Renderer: ATI Radeon HD 5800 Series
Version: 1.4 (4.0.10057 Compatibility Profile Context)
Shading language version: (null)
Creating a 3.3 context give me:
Vendor: ATI Technologies Inc.
Renderer: ATI Radeon HD 5800 Series
Version: 3.3.10057 Core Profile Forward-Compatible Context
Shading language version: 4.00
The only way I can get a 4.0 context is by creating the context with the old method, then I get only a 4.0 compatibility context and that’s normal.
The program output with a 4.0 context with valgrind is:
valgrind ./glcontext==7461== Memcheck, a memory error detector
==7461== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==7461== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==7461== Command: ./glcontext
==7461==
==7461== Syscall param ioctl(generic) points to uninitialised byte(s)
==7461== at 0x5242187: ioctl (syscall-template.S:82)
==7461== by 0x5D39A14: ukiCreateContext (in /usr/lib/libatiuki.so.1.0)
==7461== by 0x7C8CC7D: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x78000000437: ???
==7461== by 0x64E647F: ???
==7461== by 0x63D18CF: ???
==7461== by 0x7CE6BC1: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7feff57d8 is on thread 1's stack
==7461==
==7461== Conditional jump or move depends on uninitialised value(s)
==7461== at 0x7CE79DF: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7CE729F: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7CE0C04: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461==
==7461== Conditional jump or move depends on uninitialised value(s)
==7461== at 0x7B367DE: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B3426F: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B3424F: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B3427F: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B3415F: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B340BF: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B340CF: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B3422F: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x7B3421F: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E5D: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326AF: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3fff is not stack'd, malloc'd or (recently) free'd
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E67: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326AF: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3ffe is not stack'd, malloc'd or (recently) free'd
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E72: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326AF: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3ffd is not stack'd, malloc'd or (recently) free'd
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E7D: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326AF: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3ffc is not stack'd, malloc'd or (recently) free'd
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E5D: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326C4: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3fff is not stack'd, malloc'd or (recently) free'd
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E67: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326C4: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3ffe is not stack'd, malloc'd or (recently) free'd
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E72: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326C4: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3ffd is not stack'd, malloc'd or (recently) free'd
==7461==
==7461== Invalid write of size 1
==7461== at 0x4C29E7D: memcpy (mc_replace_strmem.c:497)
==7461== by 0x7B326C4: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== Address 0x7fa426ed3ffc is not stack'd, malloc'd or (recently) free'd
==7461==
==7461==
==7461== More than 10000000 total errors detected. I'm not reporting any more.
==7461== Final error counts will be inaccurate. Go fix your program!
==7461== Rerun with --error-limit=no to disable this cutoff. Note
==7461== that errors may occur in your program without prior warning from
==7461== Valgrind, because errors are no longer being displayed.
==7461==
Getting matching framebuffer configs
Found 1 matching FB configs.
Getting XVisualInfos
Matching fbconfig 0, visual ID 0x47: SAMPLE_BUFFERS = 1, SAMPLES = 8
Chosen visual ID = 0x47
Creating colormap
Creating window
Mapping window
Creating context
==7461==
==7461== Process terminating with default action of signal 11 (SIGSEGV)
==7461== Access not within mapped region at address 0x10
==7461== at 0x72E8737: ??? (in /usr/lib/dri/fglrx_dri.so)
==7461== by 0x3: ???
==7461== by 0x40220578F: ???
==7461== If you believe this happened as a result of a stack
==7461== overflow in your program's main thread (unlikely but
==7461== possible), you can try to increase the size of the
==7461== main thread stack using the --main-stacksize= flag.
==7461== The main thread stack size used in this run was 8388608.
==7461==
==7461== HEAP SUMMARY:
==7461== in use at exit: 2,227,001 bytes in 11,641 blocks
==7461== total heap usage: 31,283 allocs, 19,642 frees, 4,118,057 bytes allocated
==7461==
==7461== LEAK SUMMARY:
==7461== definitely lost: 92 bytes in 2 blocks
==7461== indirectly lost: 648 bytes in 1 blocks
==7461== possibly lost: 862,250 bytes in 10,463 blocks
==7461== still reachable: 1,364,011 bytes in 1,175 blocks
==7461== suppressed: 0 bytes in 0 blocks
==7461== Rerun with --leak-check=full to see details of leaked memory
==7461==
==7461== For counts of detected and suppressed errors, rerun with: -v
==7461== Use --track-origins=yes to see where uninitialised values come from
==7461== ERROR SUMMARY: 10000000 errors from 11 contexts (suppressed: 14 from 8)
Erreur de segmentation
Did I make a mistake somewhere or this is really a driver bug?