Closed
Bug 790504
Opened 13 years ago
Closed 13 years ago
Signaling code should directly use malloc/free
Categories
(Core :: WebRTC: Signaling, defect)
Core
WebRTC: Signaling
Tracking
()
RESOLVED
FIXED
People
(Reporter: ehugg, Assigned: ehugg)
Details
(Whiteboard: [WebRTC], [blocking-webrtc-], [qa-])
Attachments
(3 files, 7 obsolete files)
10.00 KB,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
380.79 KB,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
974 bytes,
patch
|
jesup
:
feedback+
|
Details | Diff | Splinter Review |
The signaling code currently has a bunch of memory handling code which should all be replaced by a FF standard like moz_xmalloc.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ethanhugg
Assignee | ||
Comment 1•13 years ago
|
||
Assignee | ||
Comment 2•13 years ago
|
||
Comment on attachment 660304 [details] [diff] [review]
Patch 1 - Signaling code changed to use moz_xmalloc
Everything in signaling uses cpr_malloc which I def'd to moz_xmalloc, same with the calloc, realloc and free.
I will make a second patch with the removal of all of the unused memory management code.
Attachment #660304 -
Flags: feedback?(rjesup)
Attachment #660304 -
Flags: feedback?(ekr)
Comment 3•13 years ago
|
||
Comment on attachment 660304 [details] [diff] [review]
Patch 1 - Signaling code changed to use moz_xmalloc
Review of attachment 660304 [details] [diff] [review]:
-----------------------------------------------------------------
This all looks basically fine.
The changes to VcmSIPCSBinding.cpp look to be cosmetic only (spaces, etc.)
Maybe unnecessary?
Comment 4•13 years ago
|
||
Comment on attachment 660304 [details] [diff] [review]
Patch 1 - Signaling code changed to use moz_xmalloc
Review of attachment 660304 [details] [diff] [review]:
-----------------------------------------------------------------
This all looks basically fine.
The changes to VcmSIPCSBinding.cpp look to be cosmetic only (spaces, etc.)
Maybe unnecessary?
Attachment #660304 -
Flags: feedback?(ekr) → feedback+
Assignee | ||
Comment 5•13 years ago
|
||
>The changes to VcmSIPCSBinding.cpp look to be cosmetic only (spaces, etc.)
>Maybe unnecessary?
The VcmSIPCCBinding.cpp changes are changing malloc() to cpr_malloc(). I considered changing them directly to moz_xmalloc(), but I'm trying to keep it consistent with the rest of the signaling code so that the allocators could all be changed in one place if necessary.
Comment 6•13 years ago
|
||
Wow, my brain just seems to see cpr_malloc == malloc now.
Updated•13 years ago
|
Whiteboard: [WebRTC], [blocking-webrtc-]
Assignee | ||
Comment 7•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #660304 -
Attachment is obsolete: true
Attachment #660304 -
Flags: feedback?(rjesup)
Assignee | ||
Comment 8•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #660529 -
Attachment is obsolete: true
Assignee | ||
Comment 9•13 years ago
|
||
moz_xmalloc is the wrong thing to use. Changing the patch to use malloc/calloc/realloc/free. Next patch will remove all memory management code from signaling.
Summary: Signaling code should use moz_xmalloc → Signaling code should directly use malloc/free
Assignee | ||
Comment 10•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #660572 -
Attachment is obsolete: true
Assignee | ||
Comment 11•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #660609 -
Attachment is obsolete: true
Assignee | ||
Comment 12•13 years ago
|
||
Comment on attachment 660617 [details] [diff] [review]
Patch 1 - Signaling code changed to directly use malloc/free
Review of attachment 660617 [details] [diff] [review]:
-----------------------------------------------------------------
::: media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ +1478,5 @@
> result = sdp_attr_get_ice_attribute (sdp_p, level, 0, sdp_attr, (uint16_t) (i + 1),
> &ice_attrib);
> if (result != SDP_SUCCESS) {
> GSM_ERR_MSG("Failed to retrieve ICE attribute\n");
> + cpr_free(*ice_attribs);
Switching to free() and having -Werror made the Try builders pop out this little gem. Trying to free the function param.
Assignee | ||
Comment 13•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #660617 -
Attachment is obsolete: true
Assignee | ||
Comment 14•13 years ago
|
||
Assignee | ||
Comment 15•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #660938 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Attachment #660987 -
Flags: feedback?(rjesup)
Attachment #660987 -
Flags: feedback?(ekr)
Assignee | ||
Comment 16•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #660987 -
Attachment is obsolete: true
Attachment #660987 -
Flags: feedback?(rjesup)
Attachment #660987 -
Flags: feedback?(ekr)
Assignee | ||
Updated•13 years ago
|
Attachment #661081 -
Flags: feedback?(rjesup)
Attachment #661081 -
Flags: feedback?(ekr)
Assignee | ||
Comment 17•13 years ago
|
||
Comment on attachment 661081 [details] [diff] [review]
Patch 2 - remove unused memory management code from signaling.
Pushed to Alder - http://hg.mozilla.org/projects/alder/rev/8b21741e7037
Attachment #661081 -
Flags: feedback?(rjesup)
Attachment #661081 -
Flags: feedback?(ekr)
Comment 18•13 years ago
|
||
Oh good, this gets rid of cpr_crashdump(), which I was about to flag.
Updated•13 years ago
|
Attachment #660841 -
Flags: review+
Updated•13 years ago
|
Attachment #661081 -
Flags: review+
Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 19•13 years ago
|
||
Re-opening this one. We need to go back to trying moz_xmalloc which really is infallible.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 20•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #667112 -
Flags: feedback?(rjesup)
Updated•13 years ago
|
Attachment #667112 -
Flags: feedback?(rjesup) → feedback+
Assignee | ||
Comment 21•13 years ago
|
||
Comment on attachment 667112 [details] [diff] [review]
Change to use moz_xmalloc
moz_xmalloc patch pushed to Alder - https://hg.mozilla.org/projects/alder/rev/0a74f8743068
Assignee | ||
Updated•13 years ago
|
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Whiteboard: [WebRTC], [blocking-webrtc-] → [WebRTC], [blocking-webrtc-], [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•