Closed Bug 205733 Opened 22 years ago Closed 22 years ago

IPC fails to build in 64-bit mode on AIX

Categories

(Core :: IPC, defect)

Other
AIX
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: pkwarren, Assigned: pkwarren)

Details

(Keywords: 64bit)

Attachments

(1 file, 1 obsolete file)

IPC fails to build on AIX in 64-bit mode with the following error message: xlC_r -o tmQueue.o -c -DOSTYPE=\"AIX5.1\" -DOSARCH=\"AIX\" -I./../common -I../../../../../dist/include/ipcd -I../../../../../dist/include/nspr -I../../../../../dist/include/xpcom -I../../../../../dist/include/transmngr -I../../../../../dist/include -I/home/netscape/sb/1.4b/mozilla/dist/include/nspr -qflag=w:w -DPIC -DAIX -DAIX4_3 -qwarn64 -DNDEBUG -DTRIMMED -O2 -qmaxmem=-1 -qalias=noansi -DMOZILLA_CLIENT -D_MOZILLA_CONFIG_H_ -DNSCAP_DISABLE_DEBUG_PTR_TYPES=1 -DD_INO=d_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_INT64=1 -DHAVE_UINT=1 -DHAVE_UINT_T=1 -DHAVE_UINT16_T=1 -DHAVE_64BIT_OS=1 -DHAVE_WCRTOMB=1 -DHAVE_MBRTOWC=1 -DHAVE_DIRENT_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -DHAVE_X11_XKBLIB_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_VFS_H=1 -DNEW_H=\<new\> -DHAVE_LIBC_R=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_LIBC_R=1 -DFUNCPROTO=15 -DHAVE_XSHM=1 -D_REENTRANT=1 -DHAVE_RANDOM=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -DHAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_STATVFS=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DHAVE_NL_LANGINFO=1 -DHAVE_FLOCKFILE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STRTOK_R=1 -DHAVE_RES_NINIT=1 -DHAVE_ICONV=1 -DHAVE_ICONV_WITH_CONST_INPUT=1 -DHAVE_IOS_BINARY=1 -DHAVE_IOS_BIN=1 -DHAVE_CPP_EXPLICIT=1 -DHAVE_CPP_TYPENAME=1 -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX=1 -DHAVE_CPP_PARTIAL_SPECIALIZATION=1 -DHAVE_CPP_AMBIGUITY_RESOLVING_USING=1 -DHAVE_CPP_NAMESPACE_STD=1 -DHAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL=1 -DHAVE_CPP_NEW_CASTS=1 -DNEED_CPP_UNUSED_IMPLEMENTATIONS=1 -DHAVE_I18N_LC_MESSAGES=1 -DMOZ_DEFAULT_TOOLKIT=\"gtk\" -DMOZ_WIDGET_GTK=1 -DMOZ_ENABLE_XREMOTE=1 -DMOZ_X11=1 -DMOZ_ENABLE_COREXFONTS=1 -DMOZ_EXTRA_X11CONVERTERS=1 -DOJI=1 -DIBMBIDI=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DMOZ_MATHML=1 -DMOZ_LOGGING=1 -DMOZ_USER_DIR=\".mozilla\" -DCPP_THROW_NEW=throw\(\) -DMOZ_XUL=1 -DMOZ_PROFILESHARING=1 -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 -DNS_PRINT_PREVIEW=1 -DNS_PRINTING=1 -DMOZILLA_VERSION=\"1.4b\" tmQueue.cpp "tmQueue.cpp", line 127.30: 1540-0216 (S) An expression of type "void *" cannot be converted to type "PRUint32". "tmQueue.cpp", line 194.32: 1540-0216 (S) An expression of type "void *" cannot be converted to type "PRUint32". "tmQueue.cpp", line 219.42: 1540-0216 (S) An expression of type "void *" cannot be converted to type "PRUint32". gmake[6]: *** [tmQueue.o] Error 1 I was able to fix the compilation errors by casting with NS_PTR_TO_INT32, but this is not the correct fix. It seems the IPC code passes around pointers as 32-bit integers throughout the code - this will not work as expected on 64-bit machines.
-> jgaunt (transaction manager)
Assignee: darin → jgaunt
Good to know. We have a dearth of 64 bit machines in the building, which always makes testing on them hard. ;-) Aha. What is funny about this problem is that the void*s are actually just integer indexes I get from either the ICP daemon or that I create to index the clients. I used to create pointers to the integers, but since on 32 bit machines, they are the same I just cast the integers to void*. So it looks like I'll have to revert to storing pointers to integers like it was originally.
Status: NEW → ASSIGNED
threw this together real quick, see if it fixes your problem. I'm going to test it more tomorrow to make sure it doesn't actually regress any functionality.
john: since a |PRUint32| can always be safely stored in a |void*|, i think the patch suggested by pkw is actually correct. it is perfectly safe and correct in this case to just use the NS_PTR_TO_INT32 macro. i think it would be preferred rather than introduce another heap allocation here. btw: client IDs are not generated from a memory address. rather they come from a global integer initialized at zero and incremented each time a new client connects to the IPC daemon.
Attached patch Patch v1Splinter Review
Uses NS_PTR_TO_INT32 (this does seem safe in this case - thanks Darin). Also adds a few binaries to the various .cvsignore files.
Attachment #123359 - Attachment is obsolete: true
Attachment #123408 - Flags: superreview?(darin)
Attachment #123408 - Flags: review?(jgaunt)
Taking ownership of bug.
Assignee: jgaunt → pkw
Status: ASSIGNED → NEW
Comment on attachment 123408 [details] [diff] [review] Patch v1 r=jgaunt, thanks for the patch
Attachment #123408 - Flags: review?(jgaunt) → review+
Comment on attachment 123408 [details] [diff] [review] Patch v1 sr=darin (thanks pkw!)
Attachment #123408 - Flags: superreview?(darin) → superreview+
Comment on attachment 123408 [details] [diff] [review] Patch v1 requesting drivers approval for 1.4 final. we want this in order to fix the AIX 64-bit port. thx!
Attachment #123408 - Flags: approval1.4?
Comment on attachment 123408 [details] [diff] [review] Patch v1 a=asa (on behalf of drivers) for checkin to 1.4
Attachment #123408 - Flags: approval1.4? → approval1.4+
patch checked into IPC branch. marking FIXED.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
QA Contact: carosendahl → ipc
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: