Closed
Bug 1233981
Opened 10 years ago
Closed 10 years ago
rijndael.c needs to #include <intrin.h> for _xgetvb()
Categories
(NSS :: Libraries, defect, P2)
Tracking
(firefox46 affected)
RESOLVED
FIXED
3.22
| Tracking | Status | |
|---|---|---|
| firefox46 | --- | affected |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 2 obsolete files)
|
659 bytes,
patch
|
wtc
:
review+
wtc
:
checked-in+
|
Details | Diff | Splinter Review |
Without this, clang-cl generates:
rijndael.obj : error LNK2019: unresolved external symbol _xgetbv referenced in function check_xcr0_ymm
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Attachment #8700328 -
Flags: review?(wtc)
Comment 2•10 years ago
|
||
Comment on attachment 8700328 [details] [diff] [review]
Add #include <intrin.h> to rijndael.c for _xgetvb()
Review of attachment 8700328 [details] [diff] [review]:
-----------------------------------------------------------------
Ehsan: thanks for the patch. I suggest two changes.
::: security/nss/lib/freebl/rijndael.c
@@ +31,5 @@
> static int has_intel_clmul = 0;
> static PRBool use_hw_gcm = PR_FALSE;
> +#if defined(_MSC_VER)
> +#if !defined(_M_IX86)
> +#include <intrin.h>
I would simplify the ifdef as #if defined(_MSC_VER) && !defined(_M_IX86).
According to the MSDN page at https://msdn.microsoft.com/en-us/library/hh977022.aspx, we should include the header immintrin.h. Could you please try that? Thanks.
Attachment #8700328 -
Flags: review?(wtc) → review+
| Assignee | ||
Comment 3•10 years ago
|
||
Thanks for the review! Should I land on the nss repository with your suggestions or would you like to look at another version of the patch?
Comment 4•10 years ago
|
||
Ehsan: I don't think you have commit access to the NSS repository
(https://hg.mozilla.org/projects/nss). Please attach a new version
of the patch, and I'll check it in for you. Thanks.
| Assignee | ||
Comment 5•10 years ago
|
||
clang-cl currently declares _xgetbv() in intrin.h not in immintrin.h, like many other intrinsics. In other similar situations we have just included intrin.h, even though that's not necessary for MSVC. I prefer to do the same here, if possible.
| Assignee | ||
Comment 6•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Attachment #8700328 -
Attachment is obsolete: true
Comment 7•10 years ago
|
||
Ehsan: I added a comment to the #include statement and checked in your patch:
https://hg.mozilla.org/projects/nss/rev/9e482f91fcbd
Attachment #8703211 -
Attachment is obsolete: true
Attachment #8703741 -
Flags: review+
Attachment #8703741 -
Flags: checked-in+
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
OS: Unspecified → Windows
Priority: -- → P2
Hardware: Unspecified → x86_64
Resolution: --- → FIXED
Target Milestone: --- → 3.22
| Assignee | ||
Comment 8•10 years ago
|
||
Thanks, Wan-Teh!
Is there a bug tracking the next NSS merge on mozilla-central?
Comment 9•10 years ago
|
||
Ehsan: I just did a search for "NSS 3.22" in Bugzilla and found
the tracking bug: bug 1228410.
You need to log in
before you can comment on or make changes to this bug.
Description
•