Last Comment Bug 478724 - NSS build fails on Windows since 20090213.1 nightly build.
: NSS build fails on Windows since 20090213.1 nightly build.
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Build (show other bugs)
: trunk
: x86_64 Windows Server 2003
: P1 blocker (vote)
: 3.12.3
Assigned To: Robert Relyea
:
Mentors:
Depends on:
Blocks: drbg
  Show dependency treegraph
 
Reported: 2009-02-16 04:33 PST by Slavomir Katuscak
Modified: 2009-02-17 20:56 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Slavomir Katuscak 2009-02-16 04:33:00 PST
NSS build fails on Windows since 20090213.1 nightly build:

---
cl -FoWINNT5.2_64_OPT.OBJ/WINNT_SINGLE_SHLIB/drbg.obj -c -O2 -Zi -MD -we4002 -we4003 -we4004 -we4006 -we4009 -we4013 -we4015 -we4033 -we4035 -we4045 -we4053 -we4054 -we4063 -we4064 -we4078 -we4087 -we4098 -we4390 -we4551 -we4553 -we4715 -W3 -nologo -GT -DXP_PC -DSHLIB_SUFFIX=\"dll\" -DSHLIB_PREFIX=\"\" -DSHLIB_VERSION=\"3\" -DSOFTOKEN_SHLIB_VERSION=\"3\" -DRIJNDAEL_INCLUDE_TABLES -UDEBUG -U_DEBUG -DNDEBUG -DWIN64 -D_WINDOWS -D_AMD64_ -DWINNT -DNSS_ENABLE_ECC -DNSS_ECC_MORE_THAN_SUITE_B -DUSE_UTIL_DIRECTLY -DNSS_USE_64 -DMP_API_COMPATIBLE -I../../../../dist/WINNT5.2_64_OPT.OBJ/include  -I../../../../dist/public/nss -I../../../../dist/private/nss -Impi -Iecl  /E/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c
drbg.c
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(226) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(396) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(501) : warning C4018: '>' : signed/unsigned mismatch
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(504) : error C2143: syntax error : missing ';' before 'type'
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(510) : error C2143: syntax error : missing ';' before 'type'
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(516) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(522) : warning C4267: '+=' : conversion from 'size_t' to 'PRUint32', possible loss of data
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(546) : warning C4267: '=' : conversion from 'size_t' to 'PRUint32', possible loss of data
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(558) : error C2061: syntax error : identifier 'prng_GenerateGlobalRandomBytes'
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(558) : error C2059: syntax error : ';'
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(558) : error C2059: syntax error : 'type'
e:/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl/drbg.c(627) : error C4013: 'prng_GenerateGlobalRandomBytes' undefined; assuming extern returning int
make[4]: *** [WINNT5.2_64_OPT.OBJ/WINNT_SINGLE_SHLIB/drbg.obj] Error 2
make[4]: Leaving directory `/E/security/securitytip/builds/20090213.1/nss-w2kp_WIN64/mozilla/security/nss/lib/freebl'
---

Repeated for more days on machine nss-w2kp.
Comment 1 Wan-Teh Chang 2009-02-16 21:07:22 PST
I checked in a fix in bug 457045 comment 66.

How about if we lower PRNG_MAX_ADDITIONAL_BYTES to
2^31 or 2^30 bytes?  It'll still meet the NIST SP
800-90 requirement (< 2^32 bytes), should be large
enough in practice, and will avoid the sizeof(size_t)
issue.

Note You need to log in before you can comment on or make changes to this bug.