Bug 1726 - UCS-4 characters are 8 byte on 64 bit machines
Summary: UCS-4 characters are 8 byte on 64 bit machines
Status: REOPENED
Alias: None
Product: FriBidi
Classification: Unclassified
Component: bidi (show other bugs)
Version: 0.10.4
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Behdad Esfahbod
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-27 18:12 UTC by Baruch Even
Modified: 2013-03-15 13:02 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Use standard types that will work across platforms (1.18 KB, patch)
2004-10-27 18:13 UTC, Baruch Even
Details | Splinter Review

Description Baruch Even 2004-10-27 18:12:08 UTC
The types used in FriBidi are incorrect when used on a 64 bit machine, long is
used for 32 bits and is 64 bits on 64 bit machines.

This bug was found when compiling geresh against fribidi on ia64 and alpha
machines in the Debian archive.
Comment 1 Baruch Even 2004-10-27 18:13:38 UTC
Created attachment 1187 [details] [review]
Use standard types that will work across platforms

The best course of action to solve the bug is to use standard types that have
specific size such as uint32_t, this will put the burden of making sure it is
correct on others, namely glibc.
Comment 2 Jean Bréfort 2005-04-06 09:36:47 UTC
This bug makes abiword crash on amd64. Please fix it.
Comment 3 Behdad Esfahbod 2005-04-06 09:50:54 UTC
Sorry for that.  I'll try to roll up a fix on 0.10 branch before weekend.
Comment 4 Robert Staudinger 2005-05-18 05:06:56 UTC
Is there any news on that bug? We (abiword team) are currently preparing a new
major release (about 1 month off). It would be very good if we could depend on a
new release of fribidi which includes this fix.
Thanks!
Comment 5 Behdad Esfahbod 2005-05-29 23:14:02 UTC
Good point.  I'm actually working on a new release on the stable branch that you
guys are using.  Updating to Unicode 4.1 and backporting lots of stuff from
developmental...  Will roll a tarball for testing this week surely.  Moreover,
if you guys can make Windows DLLs, I would be happy to host them.  I once
promised to try to build DLLs, but I don't have any access to a Windows machine
these days.
Comment 6 Behdad Esfahbod 2005-06-07 07:24:43 UTC
Ok, we are almost there.  Would you guys take some time to test:

http://lists.freedesktop.org/archives/fribidi/2005-June/000401.html

A final release would be out in a few hours.
Comment 7 Behdad Esfahbod 2005-06-09 13:06:43 UTC
In 0.10.5 already.
Comment 8 Blackhawk 2006-06-28 14:10:04 UTC
This bug still exists in 0.10.6 and above, hence I am reopening it.
Comment 9 Blackhawk 2006-06-28 14:17:53 UTC
I assume the changes, as suggested in the patch [attached below], have been
rolled back in 0.10.6 and above. It is causing AbiWord to crash when build
against fribidi 0.10.7. So, kindly look into this issue.
Thanks in advance. 
Comment 10 Behdad Esfahbod 2006-07-06 17:51:29 UTC
Are you cross-compiling?

What's the contents of fribidi_config.h?  0.10.7 really cannot get it wrong. 
This is the relevant part of fribidi_types.h:

#include "fribidi_config.h"

#define FRIBIDI_INT8    char
#if FRIBIDI_SIZEOF_INT+0 == 2
# define FRIBIDI_INT16  int
#elif FRIBIDI_SIZEOF_SHORT+0 == 2
# define FRIBIDI_INT16  short
#else
# error cannot determine a 16-bit integer type.  check fribidi_config.h
#endif
#if FRIBIDI_SIZEOF_INT+0 == 4
# define FRIBIDI_INT32  int
#elif FRIBIDI_SIZEOF_LONG+0 == 4
# define FRIBIDI_INT32  long
#else
# error cannot determine a 32-bit integer type.  check fribidi_config.h
#endif

  typedef unsigned FRIBIDI_INT32 fribidi_uint32;

  typedef fribidi_uint32 FriBidiChar;
Comment 11 chemtech 2013-03-15 08:10:01 UTC
Baruch Even,
Do you still experience this issue with newer soft?
Please check the status of your issue.
Comment 12 Baruch Even 2013-03-15 13:02:39 UTC
I no longer maintain the debian package and my personal machine is 32bits these days so I have no way to check. Feel free to close if you think it is fixed.


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.