You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 1.2.15 Reported for operating system, platform: NetBSD, Other
Comments on the original bug report:
On 2012-02-20 06:51:12 +0000, Julian Coleman wrote:
Created attachment 825
Fix for XChangeProperty crash.
In src/video/x11/SDL_x11video.c, the result of getpid(), i.e., a pid_t is passed to:
XChangeProperty(..., 32, ...)
However, using 32 here means that Xlib treats the value as a long, and pid_t is an int. So, we get a bus error inside Xlib.
The fix is to make sure that anything passed to XChangeProperty() is aligned correctly. Note, that the other calls to XChangeProperty() pass long values here.
The proposed patch makes a union of the pid_t return type from getpid() and a dummy long. This has been tested to fix the bus error crash on NetBSD/sparc64.
On 2012-02-21 03:18:35 +0000, Julian Coleman wrote:
Hi,
Looking at src/video/x11/SDL_x11window.c in SDLK 2.0.0, XChangeProperty() is passed &data->pid. data is a struct SDL_VideoData, and pid is a pid_t in the struct. So, this looks like it will have the same problem as 1.2.15. The same fix should apply, but inside the definition of struct SDL_VideoData.
Thanks,
J
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 1.2.15
Reported for operating system, platform: NetBSD, Other
Comments on the original bug report:
On 2012-02-20 06:51:12 +0000, Julian Coleman wrote:
On 2012-02-20 17:51:45 +0000, Sam Lantinga wrote:
On 2012-02-21 03:18:35 +0000, Julian Coleman wrote:
The text was updated successfully, but these errors were encountered: