Skip to content

Commit

Permalink
Bug 1215200, NSPR_4_10_10_RC1 and NSS_3_20_1_RC0, r=dkeeler
Browse files Browse the repository at this point in the history
  • Loading branch information
kaie committed Oct 16, 2015
1 parent bbb1b9b commit 3556fa0
Show file tree
Hide file tree
Showing 15 changed files with 232 additions and 50 deletions.
2 changes: 1 addition & 1 deletion nsprpub/TAG-INFO
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NSPR_4_10_9_RTM
NSPR_4_10_10_RC1
1 change: 0 additions & 1 deletion nsprpub/config/prdepend.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
*/

#error "Do not include this header file."

2 changes: 1 addition & 1 deletion nsprpub/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2489,7 +2489,7 @@ test -n "$target_alias" &&
MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=10
MOD_PATCH_VERSION=9
MOD_PATCH_VERSION=10
NSPR_MODNAME=nspr20
_HAVE_PTHREADS=
USE_PTHREADS=
Expand Down
2 changes: 1 addition & 1 deletion nsprpub/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dnl = Defaults
dnl ========================================================
MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=10
MOD_PATCH_VERSION=9
MOD_PATCH_VERSION=10
NSPR_MODNAME=nspr20
_HAVE_PTHREADS=
USE_PTHREADS=
Expand Down
10 changes: 10 additions & 0 deletions nsprpub/lib/ds/plarena.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ PR_IMPLEMENT(void) PL_InitArenaPool(
pool->mask = PR_BITMASK(PR_CeilingLog2(align));

pool->first.next = NULL;
/* Set all three addresses in pool->first to the same dummy value.
* These addresses are only compared with each other, but never
* dereferenced. */
pool->first.base = pool->first.avail = pool->first.limit =
(PRUword)PL_ARENA_ALIGN(pool, &pool->first + 1);
pool->current = &pool->first;
Expand Down Expand Up @@ -144,10 +147,14 @@ PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb)
{
PLArena *a;
char *rp; /* returned pointer */
PRUint32 nbOld;

PR_ASSERT((nb & pool->mask) == 0);

nbOld = nb;
nb = (PRUword)PL_ARENA_ALIGN(pool, nb); /* force alignment */
if (nb < nbOld)
return NULL;

/* attempt to allocate from arenas at pool->current */
{
Expand Down Expand Up @@ -208,6 +215,7 @@ PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb)
PL_MAKE_MEM_NOACCESS((void*)a->avail, a->limit - a->avail);
rp = (char *)a->avail;
a->avail += nb;
PR_ASSERT(a->avail <= a->limit);
/* the newly allocated arena is linked after pool->current
* and becomes pool->current */
a->next = pool->current->next;
Expand All @@ -230,6 +238,8 @@ PR_IMPLEMENT(void *) PL_ArenaGrow(
{
void *newp;

if (PR_UINT32_MAX - size < incr)
return NULL;
PL_ARENA_ALLOCATE(newp, pool, size + incr);
if (newp)
memcpy(newp, p, size);
Expand Down
37 changes: 21 additions & 16 deletions nsprpub/lib/ds/plarena.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,34 +137,39 @@ void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
#define PL_ARENA_ALLOCATE(p, pool, nb) \
PR_BEGIN_MACRO \
PLArena *_a = (pool)->current; \
PRUint32 _nb = PL_ARENA_ALIGN(pool, nb); \
PRUint32 _nb = PL_ARENA_ALIGN(pool, (PRUint32)nb); \
PRUword _p = _a->avail; \
PRUword _q = _p + _nb; \
if (_q > _a->limit) { \
if (_nb < (PRUint32)nb) { \
_p = 0; \
} else if (_nb > (_a->limit - _a->avail)) { \
_p = (PRUword)PL_ArenaAllocate(pool, _nb); \
} else { \
_a->avail = _q; \
_a->avail += _nb; \
} \
p = (void *)_p; \
PL_MAKE_MEM_UNDEFINED(p, nb); \
PL_ArenaCountAllocation(pool, nb); \
if (p) { \
PL_MAKE_MEM_UNDEFINED(p, (PRUint32)nb); \
PL_ArenaCountAllocation(pool, (PRUint32)nb); \
} \
PR_END_MACRO

#define PL_ARENA_GROW(p, pool, size, incr) \
PR_BEGIN_MACRO \
PLArena *_a = (pool)->current; \
PRUint32 _incr = PL_ARENA_ALIGN(pool, incr); \
PRUword _p = _a->avail; \
PRUword _q = _p + _incr; \
if (_p == (PRUword)(p) + PL_ARENA_ALIGN(pool, size) && \
_q <= _a->limit) { \
PL_MAKE_MEM_UNDEFINED((unsigned char *)(p) + size, incr); \
_a->avail = _q; \
PL_ArenaCountInplaceGrowth(pool, size, incr); \
PRUint32 _incr = PL_ARENA_ALIGN(pool, (PRUint32)incr); \
if (_incr < (PRUint32)incr) { \
p = NULL; \
} else if (_a->avail == (PRUword)(p) + PL_ARENA_ALIGN(pool, size) && \
_incr <= (_a->limit - _a->avail)) { \
PL_MAKE_MEM_UNDEFINED((unsigned char *)(p) + size, (PRUint32)incr); \
_a->avail += _incr; \
PL_ArenaCountInplaceGrowth(pool, size, (PRUint32)incr); \
} else { \
p = PL_ArenaGrow(pool, p, size, incr); \
p = PL_ArenaGrow(pool, p, size, (PRUint32)incr); \
} \
if (p) {\
PL_ArenaCountGrowth(pool, size, (PRUint32)incr); \
} \
PL_ArenaCountGrowth(pool, size, incr); \
PR_END_MACRO

#define PL_ARENA_MARK(pool) ((void *) (pool)->current->avail)
Expand Down
2 changes: 1 addition & 1 deletion nsprpub/pr/include/md/_linux.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@
#error "Unknown MIPS endianness."
#endif

#ifdef _ABI64
#if _MIPS_SIM == _ABI64

#define IS_64

Expand Down
4 changes: 2 additions & 2 deletions nsprpub/pr/include/prinit.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ PR_BEGIN_EXTERN_C
** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
#define PR_VERSION "4.10.9"
#define PR_VERSION "4.10.10"
#define PR_VMAJOR 4
#define PR_VMINOR 10
#define PR_VPATCH 9
#define PR_VPATCH 10
#define PR_BETA PR_FALSE

/*
Expand Down
8 changes: 4 additions & 4 deletions nsprpub/pr/tests/vercheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include <stdlib.h>

/*
* This release (4.10.7) is backward compatible with the
* This release (4.10.10) is backward compatible with the
* 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, 4.6.x, 4.7.x,
* 4.8.x, 4.9.x, 4.10, 4.10.1, 4.10.2, 4.10.3, 4.10.4,
* 4.10.5, 4.10.6, 4.10.7 and 4.10.8 releases.
* 4.10.5, 4.10.6, 4.10.7, 4.10.8, 4.10.9 releases.
* It, of course, is compatible with itself.
*/
static char *compatible_version[] = {
Expand All @@ -39,7 +39,7 @@ static char *compatible_version[] = {
"4.9", "4.9.1", "4.9.2", "4.9.3", "4.9.4", "4.9.5",
"4.9.6",
"4.10", "4.10.1", "4.10.2", "4.10.3", "4.10.4",
"4.10.5", "4.10.6", "4.10.7", "4.10.8",
"4.10.5", "4.10.6", "4.10.7", "4.10.8", "4.10.9",
PR_VERSION
};

Expand All @@ -55,7 +55,7 @@ static char *incompatible_version[] = {
"3.0", "3.0.1",
"3.1", "3.1.1", "3.1.2", "3.1.3",
"3.5", "3.5.1",
"4.10.10",
"4.10.11",
"4.11", "4.11.1",
"10.0", "11.1", "12.14.20"
};
Expand Down
2 changes: 1 addition & 1 deletion security/nss/TAG-INFO
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NSS_3_20_RTM
NSS_3_20_1_RC0
1 change: 1 addition & 0 deletions security/nss/coreconf/coreconf.dep
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
*/

#error "Do not include this header file."

4 changes: 2 additions & 2 deletions security/nss/lib/nss/nss.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
*/
#define NSS_VERSION "3.20" _NSS_ECC_STRING _NSS_CUSTOMIZED
#define NSS_VERSION "3.20.1" _NSS_ECC_STRING _NSS_CUSTOMIZED
#define NSS_VMAJOR 3
#define NSS_VMINOR 20
#define NSS_VPATCH 0
#define NSS_VPATCH 1
#define NSS_VBUILD 0
#define NSS_BETA PR_FALSE

Expand Down
4 changes: 2 additions & 2 deletions security/nss/lib/softoken/softkver.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
*/
#define SOFTOKEN_VERSION "3.20" SOFTOKEN_ECC_STRING
#define SOFTOKEN_VERSION "3.20.1" SOFTOKEN_ECC_STRING
#define SOFTOKEN_VMAJOR 3
#define SOFTOKEN_VMINOR 20
#define SOFTOKEN_VPATCH 0
#define SOFTOKEN_VPATCH 1
#define SOFTOKEN_VBUILD 0
#define SOFTOKEN_BETA PR_FALSE

Expand Down
4 changes: 2 additions & 2 deletions security/nss/lib/util/nssutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <Beta>]"
*/
#define NSSUTIL_VERSION "3.20"
#define NSSUTIL_VERSION "3.20.1"
#define NSSUTIL_VMAJOR 3
#define NSSUTIL_VMINOR 20
#define NSSUTIL_VPATCH 0
#define NSSUTIL_VPATCH 1
#define NSSUTIL_VBUILD 0
#define NSSUTIL_BETA PR_FALSE

Expand Down
Loading

0 comments on commit 3556fa0

Please sign in to comment.