[Asterisk-code-review] core: Stop using AST INLINE API for allocator functions. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Mar 15 05:44:07 CDT 2018


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/8521 )

Change subject: core: Stop using AST_INLINE_API for allocator functions.
......................................................................


Patch Set 4:

(2 comments)

Doing a test 'make' with/without MALLOC_DEBUG then I'll post the updates I have.

https://gerrit.asterisk.org/#/c/8521/4/third-party/pjproject/patches/asterisk_malloc_debug.h
File third-party/pjproject/patches/asterisk_malloc_debug.h:

https://gerrit.asterisk.org/#/c/8521/4/third-party/pjproject/patches/asterisk_malloc_debug.h@28
PS4, Line 28: int __ast_asprintf(const char *file, int lineno, const char *func, char **strp, const char *format, ...)
> This file needs to be reverted and then the attribute_malloc added where ap
I'm adding attribute_malloc but for now it's going to be a noop.  We don't have access to HAVE_ATTRIBUTE_malloc from here and I don't how to make that happen.

That said I'm not sure we support any compiler which lacks support for __attribute__((malloc))?  We already require __attribute__((constructor)) and we require __sync or __atomic built-in's so I could just make Asterisk ./configure.ac bail if __attribute__((malloc)) is unsupported, then we could use it here unconditionally (this is master only).


https://gerrit.asterisk.org/#/c/8521/4/third-party/pjproject/patches/asterisk_malloc_debug.h@51
PS4, Line 51: 	__ast_asprintf(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, b, c)
While I'm switching back to the __ast_repl variants I'm also giving these proper argument names.



-- 
To view, visit https://gerrit.asterisk.org/8521
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If9df4377f74bdbb627461b27a473123e05525887
Gerrit-Change-Number: 8521
Gerrit-PatchSet: 4
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Thu, 15 Mar 2018 10:44:07 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180315/69c33779/attachment.html>


More information about the asterisk-code-review mailing list