Closed Bug 447946 Opened 16 years ago Closed 16 years ago

Crash anywhere with optimize on x64 Windows build due to alignment

Categories

(Core :: XPCOM, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: m_kato, Assigned: m_kato)

Details

(Keywords: 64bit)

Attachments

(1 file, 1 obsolete file)

With optimize such as -Ox, Windows x64 build will crash anywhere. Because xptcall code didn't consider alignment. Windows x64 has to consider alignment of stack layout (per 16 bytes). I will attach the patch later.
Attached patch a patch v1 (obsolete) (deleted) — Splinter Review
Attachment #331465 - Flags: superreview?(benjamin)
Attachment #331465 - Flags: review?(benjamin)
+ ; Builld parameters i presume you mean Build ?
Comment on attachment 331465 [details] [diff] [review] a patch v1 I don't really know this assembly, so I'm going to delegate review to mmoy, if he's willing. The macrology looks fine.
Attachment #331465 - Flags: superreview?(benjamin)
Attachment #331465 - Flags: superreview+
Attachment #331465 - Flags: review?(mmoy)
Attachment #331465 - Flags: review?(benjamin)
I built 3.0 (Win x64) with and without this code at -O1 and -O2. Both builds at -O1 showed crash problems. Both builds at -O2 didn't show crash problems. So my perception is that this code didn't break anything but that there are still problems in the code at -O1. I didn't see anything that jumped out as a problem in reading through the code though there are some directives that I'm not familiar with. I only have a few remarks on a few comments: A few typos of the forms: Builld -> Build fist -> first In the following, the comment indicates four parameters but the code either indicates three or six parameters: ; ; fist 4 parameters (1st is "this" pointer) are passed in registers. ; ; for floating value - movsd [rsp+64], xmm1 - movsd [rsp+72], xmm2 - movsd [rsp+80], xmm3 + movsd qword ptr [rsp+64], xmm1 + movsd qword ptr [rsp+72], xmm2 + movsd qword ptr [rsp+80], xmm3 ; for integer value mov [rsp+40], rdx mov [rsp+48], r8 mov [rsp+56], r9
Attached patch patch v2 (deleted) — Splinter Review
Attachment #331465 - Attachment is obsolete: true
Attachment #331465 - Flags: review?(mmoy)
Attachment #345421 - Flags: review?(mmoy)
Attachment #345421 - Flags: review?(mmoy) → review+
Attachment #345421 - Flags: superreview?(benjamin)
Attachment #345421 - Flags: superreview?(benjamin) → superreview+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: