Closed Bug 1890927 Opened 1 year ago Closed 7 months ago

PR_GetUniqueIdentity asserts on the 32767th call

Categories

(NSPR :: NSPR, defect, P1)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: leggert, Assigned: leggert)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached patch prlayer.c.diff (obsolete) — Splinter Review

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.

Summary: PR_GetUniqueIdentity asserts on the crashes on the 32767th call → PR_GetUniqueIdentity asserts on the 32767th call
Attached patch prlayer.c.diffSplinter Review
Assignee: nobody → leggert
Attachment #9396162 - Attachment is obsolete: true

The severity field is not set for this bug.
:KaiE, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(kaie)
Severity: -- → S3
Flags: needinfo?(kaie)
Priority: -- → P1

I guess the fix for this didn't make it into the recent NSPR release? Is there a timeline for landing this?

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

Attachment #9396164 - Flags: review+
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 4.37

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

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

It might be necessary to explicitly set the type of "1", to ensure the left shift is considered acceptable for the type.

I'll attach an attempted fix and start a try run.

Attachment #9446071 - Attachment description: WIP: Bug 1890927 - Follow-up to fix a report from UndefinedBehaviorSanitizer. → Bug 1890927 - Follow-up to fix a report from UndefinedBehaviorSanitizer. r=leggert
Status: REOPENED → RESOLVED
Closed: 7 months ago7 months ago
Resolution: --- → FIXED
Blocks: 1975156
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: