php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27056 imagepstext dies on 64bit system
Submitted: 2004-01-27 03:57 UTC Modified: 2004-01-27 20:32 UTC
From: aleksander dot piotrowski at nic dot com dot pl Assigned:
Status: Closed Package: GD related
PHP Version: 4.3.4 OS: OpenBSD/sparc64 -current
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
11 - 10 = ?
Subscribe to this entry?

 
 [2004-01-27 03:57 UTC] aleksander dot piotrowski at nic dot com dot pl
Description:
------------
I don't know how much this is OpenBSD-specific but on my sparc64 system (SUN Ultra 10) imagepstext dies with SIGBUS.

Following patch helps a lot. With it, everything works OK.

Is it simply 64bit issue? I guess that yes, because on i386 everyting works OK without this patch.

--- ext/gd/gd.c.orig    2004-01-27 01:56:38.000000000 +0100
+++ ext/gd/gd.c 2004-01-27 01:57:57.000000000 +0100
@@ -3301,7 +3301,11 @@ PHP_FUNCTION(imagepstext)
 {
        zval *img, *fnt;
        int i, j;
+#if defined(__arch64__) && defined(__OpenBSD__)
+       long _fg, _bg, x, y, size, space = 0, aa_steps = 4, width = 0;
+#else  
        int _fg, _bg, x, y, size, space = 0, aa_steps = 4, width = 0;
+#endif 
        int *f_ind;
        int h_lines, v_lines, c_ind;
        int rd, gr, bl, fg_rd, fg_gr, fg_bl, bg_rd, bg_gr, bg_bl;


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-27 20:32 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC