Bug 78861
Summary: | SDL DGA segfaults on program start in DGA_SetVideoMode | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | Luca Barbieri <ldb> | ||||
Component: | SDL | Assignee: | wdovlrrw <brosenkr> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2002-12-03 12:28:18 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Luca Barbieri
2002-12-02 12:34:17 UTC
The problem is probably the use of modes[i] after modes has been freed. The code should either use mode-> or delay freeing modes. I have not tested whether fixing this solves the problem. /* Set the video mode */ mode = SDL_NAME(XDGASetMode)(DGA_Display, DGA_Screen, modes[i].num); XFree(modes); if ( mode == NULL ) { SDL_SetError("Unable to switch to requested mode"); return(NULL); } DGA_visualClass = modes[i].visualClass; memory_base = (Uint8 *)mode->data; memory_pitch = mode->mode.bytesPerScanline; Created attachment 87187 [details]
Patch: tested and fixes the problem
The patch solves the problem on my system. The bug is also present in upstream CVS, so please forward the patch. The bug is fixed in CVS, now. |