Skip to content

Faulty Patch insert and Crash on Compile #4

Description

@moppi79

Hi
When i Try to insert
wget github.com/asterisk/asterisk/commit/28501051b47e6bb8968bb016abf0b3493c05fa21.patch
patch -p1 --reverse <./28501051b47e6bb8968bb016abf0b3493c05fa21.patch

i get the answer:

patching file include/asterisk/format_cache.h
Hunk #1 succeeded at 238 (offset 15 lines).
patching file main/codec_builtin.c
Unreversed patch detected! Ignore -R? [n] n
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file main/codec_builtin.c.rej
patching file main/format_cache.c
Hunk #1 succeeded at 245 (offset 13 lines).
Hunk #2 succeeded at 347 with fuzz 2 (offset 16 lines).
Hunk #3 succeeded at 448 with fuzz 1 (offset 22 lines).
patching file main/rtp_engine.c
Hunk #1 succeeded at 3910 (offset 1712 lines).
Hunk #2 succeeded at 3990 with fuzz 2 (offset 1747 lines).
patching file res/res_format_attr_silk.c
Hunk #1 succeeded at 43 (offset 3 lines).
Hunk #2 succeeded at 57 (offset 3 lines).
Hunk #3 succeeded at 68 (offset 3 lines).
Hunk #4 succeeded at 118 (offset 9 lines).
Hunk #5 succeeded at 139 (offset 9 lines).
Hunk #6 succeeded at 154 (offset 9 lines).
Hunk #7 succeeded at 192 (offset 9 lines).
Hunk #8 succeeded at 214 (offset 9 lines).

while Compiling than the Crash

[CC] codec_silk_open_source.c -> codec_silk_open_source.o
In file included from /root/here1/asterisk-22.5.2/include/asterisk.h:23,
from codec_silk_open_source.c:7:
codec_silk_open_source.c: In function ‘lintosilk_new’:
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:158:9: error: ‘Do_not_use_malloc__use_ast_malloc’ undeclared (first use in this function)
158 | Do_not_use_malloc__use_ast_malloc->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:158:9: note: in definition of macro ‘malloc’
158 | Do_not_use_malloc__use_ast_malloc->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:158:9: note: each undeclared identifier is reported only once for each function it appears in
158 | Do_not_use_malloc__use_ast_malloc->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:158:9: note: in definition of macro ‘malloc’
158 | Do_not_use_malloc__use_ast_malloc->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
codec_silk_open_source.c: In function ‘silktolin_new’:
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:158:9: error: ‘Do_not_use_malloc__use_ast_malloc’ undeclared (first use in this function)
158 | Do_not_use_malloc__use_ast_malloc->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:158:9: note: in definition of macro ‘malloc’
158 | Do_not_use_malloc__use_ast_malloc->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
codec_silk_open_source.c: In function ‘lintosilk_destroy’:
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:160:9: error: ‘Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory’ undeclared (first use in this function)
160 | Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:160:9: note: in definition of macro ‘free’
160 | Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
codec_silk_open_source.c: In function ‘silktolin_destroy’:
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:160:9: error: ‘Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory’ undeclared (first use in this function)
160 | Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/here1/asterisk-22.5.2/include/asterisk/astmm.h:160:9: note: in definition of macro ‘free’
160 | Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [/root/here1/asterisk-22.5.2/Makefile.rules:165: codec_silk_open_source.o] Error 1
make: *** [Makefile:396: codecs] Error 2

i use Asterisk 22.5.2 LTS
On Debian GNU/Linux 12 (bookworm)
hardware is a Raspberry PI 5

BR
Moppi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions