Closed
Bug 1437532
Opened 7 years ago
Closed 7 years ago
PodOperations.h:32:9: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct JS::TabSizes'; use assignment or value-initialization instead [-Wclass-memaccess]
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla61
People
(Reporter: Sylvestre, Assigned: andi)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
In file included from /root/firefox-gcc-last/js/src/jsobj.h:12,
from /root/firefox-gcc-last/js/src/vm/Scope.h:13,
from /root/firefox-gcc-last/js/src/frontend/NameAnalysisTypes.h:12,
from /root/firefox-gcc-last/js/src/jsscript.h:22,
from /root/firefox-gcc-last/js/src/vm/Runtime.h:25,
from /root/firefox-gcc-last/js/src/jscntxt.h:22,
from /root/firefox-gcc-last/js/src/vm/RegExpObject.h:15,
from /root/firefox-gcc-last/js/src/builtin/RegExp.h:10,
from /root/firefox-gcc-last/js/src/builtin/RegExp.cpp:7:
/root/firefox-gcc-last/js/src/gc/Barrier.h:655:7: note: 'class js::HeapSlot' declared here
class HeapSlot : public WriteBarrieredBase<Value>
^~~~~~~~
In file included from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/HashTable.h:18,
from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/TracingAPI.h:12,
from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/GCPolicyAPI.h:47,
from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/GCVector.h:12,
from /root/firefox-gcc-last/js/src/jscntxt.h:15,
from /root/firefox-gcc-last/js/src/vm/RegExpObject.h:15,
from /root/firefox-gcc-last/js/src/builtin/RegExp.h:10,
from /root/firefox-gcc-last/js/src/builtin/RegExp.cpp:7:
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/PodOperations.h: In instantiation of 'void mozilla::PodZero(T*) [with T = JS::TabSizes]':
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/MemoryMetrics.h:40:39: required from here
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/PodOperations.h:32:9: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct JS::TabSizes'; use assignment or value-initialization instead [-Wclass-memaccess]
memset(aT, 0, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~
Reporter | ||
Comment 1•7 years ago
|
||
Andi, could you please take care of that? Thanks!
Assignee: nobody → bpostelnicu
Reporter | ||
Updated•7 years ago
|
Summary: /PodOperations.h:32:9: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct JS::TabSizes'; use assignment or value-initialization instead [-Wclass-memaccess] → PodOperations.h:32:9: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct JS::TabSizes'; use assignment or value-initialization instead [-Wclass-memaccess]
Comment hidden (mozreview-request) |
Updated•7 years ago
|
Component: MFBT → JavaScript Engine
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8958380 [details]
Bug 1437532 - prevent doing memset on a non-trivial type.
https://reviewboard.mozilla.org/r/227330/#review233494
Stealing trivial review.
Attachment #8958380 -
Flags: review+
Updated•7 years ago
|
Priority: -- → P2
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8e53f08e1d90
prevent doing memset on a non-trivial type. r=jorendorff
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•7 years ago
|
Attachment #8958380 -
Flags: review?(n.nethercote)
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•