PR_GetUniqueIdentity asserts on the 32767th call
Categories
(NSPR :: NSPR, defect, P1)
Tracking
(Not tracked)
People
(Reporter: leggert, Assigned: leggert)
References
Details
Attachments
(2 files, 1 obsolete file)
Reported in https://github.com/mozilla/neqo/issues/1449, but this is an NSPR limitation/bug.
PRDescIdentity
is a PRIntn
typedef, which on most (all?) platforms now is at least four bytes long. The failing assert in PR_GetUniqueIdentity()
assumes a (fixed) two-byte length, however.
Patch that changes this assert to be length-aware is attached.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Comment 2•1 year ago
|
||
The severity field is not set for this bug.
:KaiE, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Assignee | ||
Comment 3•10 months ago
|
||
I guess the fix for this didn't make it into the recent NSPR release? Is there a timeline for landing this?
Comment 4•7 months ago
|
||
Comment on attachment 9396164 [details] [diff] [review]
prlayer.c.diff
Thank you Lars, LGTM, and sorry it took so long to find time for it.
r=kaie
Comment 5•7 months ago
|
||
Comment 6•7 months ago
|
||
There's a problem with the commit, reopening.
https://treeherder.mozilla.org/jobs?repo=nss&selectedTaskRun=Eu6_KVZfTsa53XgIShg3kw.0
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../pr/src/io/prlayer.c:565:3 in
Comment 7•7 months ago
|
||
It might be necessary to explicitly set the type of "1", to ensure the left shift is considered acceptable for the type.
Comment 8•7 months ago
|
||
I'll attach an attempted fix and start a try run.
Comment 9•7 months ago
|
||
Comment 10•7 months ago
|
||
Patch works, will request review.
https://treeherder.mozilla.org/jobs?repo=nss-try&revision=5e81b47ab8360e94798b9c60fbe79e02ba96b60c
Updated•7 months ago
|
Comment 11•7 months ago
|
||
pushed with rs=bustage
https://hg.mozilla.org/projects/nspr/rev/312d29bc142f57cca74261be4f05dc863be35a6f
Description
•