Bug 30924 - incorrect checking of return value of driAllocateTexture
Summary: incorrect checking of return value of driAllocateTexture
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R100 (show other bugs)
Version: 7.8
Hardware: All All
: medium normal
Assignee: Default DRI bug account
QA Contact:
Depends on:
Reported: 2010-10-16 07:55 UTC by Scott Bertilson
Modified: 2019-09-18 18:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Scott Bertilson 2010-10-16 07:55:26 UTC
driAllocateTexture returns -1 for failure to allocate the texture.  The code checks against NULL.

[driAllocateTexture:631] unable to allocate texture

0: /usr/bin/X (xorg_backtrace+0x3b) [0x80ef15b]
1: /usr/bin/X (0x8048000+0x5cff5) [0x80a4ff5]
2: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe410]
3: /usr/lib/dri/radeon_dri.so (0xb433a000+0x381bf) [0xb43721bf]
4: /usr/lib/libdrm_radeon.so.1 (radeon_cs_emit+0x14) [0xb70973d4]
5: /usr/lib/dri/radeon_dri.so (0xb433a000+0x35c78) [0xb436fc78]
6: /usr/lib/dri/radeon_dri.so (0xb433a000+0x35d2c) [0xb436fd2c]
7: /usr/lib/dri/radeon_dri.so (0xb433a000+0x35f32) [0xb436ff32]
8: /usr/lib/dri/radeon_dri.so (0xb433a000+0x17e0a) [0xb4351e0a]
9: /usr/lib/dri/radeon_dri.so (0xb433a000+0x75ccb) [0xb43afccb]
10: /usr/lib/dri/radeon_dri.so (0xb433a000+0x17b3c8) [0xb44b53c8]
11: /usr/lib/xorg/modules/extensions/libglx.so (0xb71b7000+0x83a0) [0xb71bf3a0]
12: /usr/lib/xorg/modules/extensions/libglx.so (0xb71b7000+0x31c45) [0xb71e8c45]
13: /usr/lib/xorg/modules/extensions/libglx.so (0xb71b7000+0x3645e) [0xb71ed45e]
14: /usr/bin/X (0x8048000+0x23707) [0x806b707]
15: /usr/bin/X (0x8048000+0x1dbb5) [0x8065bb5]
16: /lib/libc.so.6 (__libc_start_main+0xe6) [0xb7333a66]
17: /usr/bin/X (0x8048000+0x1d781) [0x8065781]
Segmentation fault at address 0x14
Comment 1 Scott Bertilson 2010-10-17 09:54:00 UTC
What I mean here is that everywhere else that I see driAllocateTexture used, the return value is actually checked against -1 which seems to indicate that this must not be right whether or not it actually caused the segfault.
Comment 2 GitLab Migration User 2019-09-18 18:40:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/275.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.