dtoa.c: Incorrect error handling

RESOLVED FIXED in Firefox 54

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: skiinale2011, Assigned: skiinale2011)

Tracking

unspecified
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20161209095719

Steps to reproduce:

Define multiple constants, such as IEEE_8087, VAX or IBM, at a time.


Actual results:

Compiler errors:

~/dev/spidermonkey/js/src/dtoa.c:258:1: error: ‘Exactly’ does not name a type
 Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
 ^
~/dev/spidermonkey/js/src/dtoa.c:261:41: error: ‘U’ does not name a type
 typedef union { double d; ULong L[2]; } U;
                                         ^
~/dev/spidermonkey/js/src/dtoa.c:1166:3: error: ‘U’ was not declared in this scope
  (U x)
   ^
//and something like that


Expected results:

Compiler error will not be handled properly, so we get an UB and a lot of strange compile errors.

Updated

2 years ago
Attachment #8827924 - Flags: review?(jorendorff)
Comment hidden (mozreview-request)

Comment 2

2 years ago
mozreview-review
Comment on attachment 8833704 [details]
Fix for bug #1331954

https://reviewboard.mozilla.org/r/109884/#review112032

(taking review over per IRC conversation)

Thank you for your patch :)
looks good.
Attachment #8833704 - Flags: review+
Comment on attachment 8827924 [details] [diff] [review]
My fix to this problem

clearing old one.
Attachment #8827924 - Flags: review?(jorendorff)
Assignee: nobody → skiinale2011
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
forgot to check commit message.

can you update the commit message to follow the rule described in this document?
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Committing_Rules_and_Responsibilities#Commit_message_restrictions

for this bug, "Bug 1331954 - Put forgotten #error directive to dtoa.c" or something like that.
Flags: needinfo?(skiinale2011)
I guess I should land it manually with the modified commit message, instead of using autoland.
I'll land it shortly
Flags: needinfo?(skiinale2011) → needinfo?(arai.unmht)
Flags: needinfo?(arai.unmht)

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f9cc96d0a27a
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.