Closed
Bug 1404169
Opened 7 years ago
Closed 7 years ago
fsanitize=enum (ubsan) runtime errors in extensions/universalchardet/src/base/nsCodingStateMachine.h
Categories
(Core :: Internationalization, defect, P3)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: arthur, Assigned: arthur)
References
(Blocks 1 open bug)
Details
(Whiteboard: [tor])
Attachments
(1 file)
4.72 KB,
patch
|
m_kato
:
review+
|
Details | Diff | Splinter Review |
I am working on tracking down and fixing ubsan errors reported in Mozilla's automated tests.
When I use -fsanitize=enum, one of the errors I get is:
> [task 2017-09-25T00:47:57.792Z] 00:47:57 INFO - TEST-START | extensions/universalchardet/tests/test_bug426271-utf-8.html
> [task 2017-09-25T00:47:57.902Z] 00:47:57 INFO - GECKO(4261) | /builds/worker/workspace/build/src/extensions/universalchardet/src/base/nsCodingStateMachine.h:49:12: runtime error: load of value 5, which is not a valid value for type 'nsSMState'
> [task 2017-09-25T00:47:57.903Z] 00:47:57 INFO - GECKO(4261) | /builds/worker/workspace/build/src/extensions/universalchardet/src/base/nsCodingStateMachine.h:39:9: runtime error: load of value 5, which is not a valid value for type 'nsSMState'
> [task 2017-09-25T00:47:57.904Z] 00:47:57 INFO - GECKO(4261) | /builds/worker/workspace/build/src/extensions/universalchardet/src/base/nsCodingStateMachine.h:46:30: runtime error: load of value 5, which is not a valid value for type 'nsSMState'
> [task 2017-09-25T00:47:57.906Z] 00:47:57 INFO - GECKO(4261) | /builds/worker/workspace/build/src/extensions/universalchardet/src/base/nsCodingStateMachine.h:46:30: runtime error: load of value 5, which is not a valid value for type 'nsSMState'
the same error was reported here:
https://bugs.freedesktop.org/show_bug.cgi?id=101032
where they replaced the nsSMState by an unsigned int. Here's the patch:
https://cgit.freedesktop.org/uchardet/uchardet/commit/?id=53f7ad0e0b0894f11c948ee75f74595ab1b61405
Should we do the same thing?
Comment 1•7 years ago
|
||
Yes, nsSMState shouldn't use enum. It uses non-enum value too.
Priority: -- → P3
Assignee | ||
Comment 2•7 years ago
|
||
Thanks. Here's a version of the patch for mozilla-central.
Attachment #8913508 -
Flags: review?(m_kato)
Updated•7 years ago
|
Attachment #8913508 -
Flags: review?(m_kato) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Thank you for the review.
Try server results: https://treeherder.mozilla.org/#/jobs?repo=try&revision=be58c7cf95e9
Assignee: nobody → arthuredelstein
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2e390724da6f
Fix ubsan runtime error for nsSMState enum. r=m_kato
Keywords: checkin-needed
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•