From:             aleksander dot piotrowski at nic dot com dot pl
Operating system: OpenBSD/sparc64 -current
PHP version:      4.3.4
PHP Bug Type:     GD related
Bug description:  imagepstext dies on 64bit system

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;


-- 
Edit bug report at http://bugs.php.net/?id=27056&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27056&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27056&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27056&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27056&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27056&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27056&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27056&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27056&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27056&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27056&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27056&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27056&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27056&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27056&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27056&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27056&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27056&r=float

Reply via email to