bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

pk11slot.c and pkcs11c.c can't be compiled in 64-bit mode without -O2 on AIX.



18 years ago
12 years ago


(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)


Firefox Tracking Flags

(Not tracked)



(3 attachments)



18 years ago
mozilla/security/nss/lib/pk11wrap/pk11slot.c cannot be compiled
on AIX in debug builds (without any optimization flags):

xlC_r -o AIX4.3_64_DBG.OBJ/pk11slot.o -c -g -DAIX -DSYSV -qarch=com -DAIX_64BIT
-I../../../../dist/AIX4.3_64_DBG.OBJ/include  -I../../../../dist/public/security
-I../../../../dist/private/security -I../../../../dist/public/security
-I../../../../dist/public/dbm  pk11slot.c
    1500-008: (S) COMPILER LIMIT EXCEEDED in pk11_MapPBEMechanismTypeToAlgtag:
Program too complicated to be compiled.  Compilation ended.  Reduce the
complexity of the program and recompile, or lower the level of optimization and

Compiling with -O2 works.  I don't know why.

xlC_r -o AIX4.3_64_DBG.OBJ/pk11slot.o -c -O2 -DAIX -DSYSV -qarch=com -DAIX_64BIT
-I../../../../dist/AIX4.3_64_DBG.OBJ/include  -I../../../../dist/public/security
-I../../../../dist/private/security -I../../../../dist/public/security
-I../../../../dist/public/dbm  pk11slot.c
    1500-030: (I) INFORMATION: PK11_ParamToAlgid: Additional optimization may be
attained by recompiling and specifying MAXMEM option with a value greater than

Note that this same file had trouble on 64-bit HP-UX too.  There it
appeared to make the compiler generate incorrect code.  See Bugzilla
bug #55267.

Comment 1

18 years ago
Created attachment 21337 [details] [diff] [review]
Proposed workaround.  Compile pk11slot.c with -O2.

Comment 2

18 years ago
The workaround is checked in on the tip.
/cvsroot/mozilla/security/nss/lib/pk11wrap/Makefile, revision 1.2

To fully investigate this may take a lot of time (this could be a
compiler bug), so I am setting the target milestone to "Future".
Priority: -- → P3
Target Milestone: --- → Future
This is only a problem for the 64-bit builds, so the workaround
should only occur for 64-bit builds, I think.

Comment 4

18 years ago
Created attachment 21349 [details] [diff] [review]
Additional patch.  Use workaround in 64-bit mode only.  pkcs11c.c also needs workaround.

Comment 5

18 years ago
I checked in the additional patch.
/cvsroot/mozilla/security/nss/lib/pk11wrap/Makefile, revision 1.3
/cvsroot/mozilla/security/nss/lib/softoken/Makefile, revision 1.2

So we are having problems with 64-bit builds on AIX and HP-UX.
Both involve switch statements whose expression is of type
CK_MECHANISM_TYPE (which is CK_ULONG, which in turn is unsigned
long int).
Summary: pk11slot.c can't be compiled without -O2 on AIX. → pk11slot.c and pkcs11.c can't be compiled in 64-bit mode without -O2 on AIX.
Here is some additional detail about this problem.

1. Changing the switch to a series of 
if (mech == XXXXXXXXXX) then
statements had no effect on this problem

2. Creating a local PRUint32 variable initialized from "mech",
and switching on that variable had no effect on the problem.

3. Creating a local variable to hold the return value, and 
changing all the return statements to assignments of that 
variable, and then returning that variable at the end, had
no effect on the problem.


17 years ago
Summary: pk11slot.c and pkcs11.c can't be compiled in 64-bit mode without -O2 on AIX. → pk11slot.c and pkcs11c.c can't be compiled in 64-bit mode without -O2 on AIX.

Comment 7

17 years ago
In NSS 3.4, pkcs11.c also needs the workaround.  See bug 110088.

Comment 8

16 years ago
Created attachment 79313 [details] [diff] [review]
same patch for ckhelper.c

Today, I added code to dev/ckhelper.c that executes a switch on a cryptoki
type.  This broke the AIX 64-bit debug build for that file, exactly as
described here.  I applied the same workaround in the Makefile.

Comment 9

16 years ago
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
QA Contact: bishakhabanerjee → jason.m.reid
I think the real resolution is to drop support for AIX.
Last Resolved: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.