Skip to content
Snippets Groups Projects
  1. Feb 26, 2020
    • Sebastian Kemper's avatar
      check_expr2: fix cross-compile/hardening issues · b7fbb9c4
      Sebastian Kemper authored
      
      When building check_expr2 with ASLR PIE hardening enabled the linker
      fails. This is resolved by adding the regular compiler flags when
      building the object files from ast_expr2f.c and ast_expr2.c.
      
      Note: The STANDALONE define is removed because it is already defined in
      _ASTCFLAGS. YY_NO_INPUT is defined so that the compile survives
      '--enable-dev-mode'.
      
      Also, a Makefile variable "CROSS_COMPILING" is added so that the
      build system doesn't try to run check_expr2 when cross-compiling,
      because that will fail the build as will.
      
      ASTERISK-28685 #close
      
      Signed-off-by: default avatarSebastian Kemper <sebastian_ml@gmx.net>
      Change-Id: If435b7db9f9ad8266245bda51c81c220f9658915
      b7fbb9c4
  2. Aug 08, 2018
    • Corey Farrell's avatar
      CI: Add support for coverage processing. · addfc938
      Corey Farrell authored
      Enable coverage with `./tests/CI/buildAsterisk.sh --coverage`.  This
      will cause Asterisk to be compiled with coverage support.  It also
      initializes 'before' coverage data for all sources.  Accept
      --tested-only to disable modules which are not run by any test.
      Enabling coverage also sets tested-only true by default.  To build
      everything with coverage enabled use `--coverage --tested-only=0`.
      
      ./tests/CI/processCoverage.sh is used to process the coverage and
      generate HTML reports.
      
      Fix utils/check_expr2 which failed to compiled with coverage enabled.
      
      Add status output 5 times per stage of astobj2_test_perf to ensure
      remote CLI does not timeout when compiled with coverage.  Remote CLI
      disconnects if no output is received for 60 seconds.  When coverage is
      enabled it takes about 70 seconds for my laptop to run the stages of
      this test, so with the change a message is printed every 14 seconds.
      
      Change-Id: I890f7d5665087426ad7d3e363187691b9afc2222
      addfc938
  3. Aug 01, 2018
    • Corey Farrell's avatar
      Build System: Improve ccache matching for different menuselect options. · a10a3aff
      Corey Farrell authored
      Changing any Menuselect option in the `Compiler Flags` section causes a
      full rebuild of the Asterisk source tree.  Every enabled option causes
      a #define to be added to buildopts.h, thus breaking ccache caching for
      every source file that includes "asterisk.h".  In most cases each option
      only applies to one or two files.  Now we only define those options for
      the specific sources which use them, this causes much better cache
      matching when working with multiple builds.  For example testing code
      with an without MALLOC_DEBUG will now use just over half the ccache
      size, only main/astmm.o will have two builds cached instead of every
      file.
      
      Reorder main/Makefile so _ASTCFLAGS set on specific object files are all
      together, sorted by filename.  Stop adding -DMALLOC_DEBUG to CFLAGS of
      bundled pjproject, this define is no longer used by any header so only
      serves to break cache.
      
      The only code change is a slight adjustment to how main/astmm.c is
      initialized.  Initialization functions always exist so main/asterisk.c
      can call them unconditionally.  Additionally rename the astmm
      initialization functions so they are not exported.
      
      Change-Id: Ie2085237a964f6e1e6fff55ed046e2afff83c027
      a10a3aff
  4. May 11, 2018
    • Corey Farrell's avatar
      Fix GCC 8 build issues. · b5914d90
      Corey Farrell authored
      This fixes build warnings found by GCC 8.  In some cases format
      truncation is intentional so the warning is just suppressed.
      
      ASTERISK-27824 #close
      
      Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
      b5914d90
  5. Apr 17, 2018
  6. Mar 17, 2018
    • Corey Farrell's avatar
      core: Stop using AST_INLINE_API for allocator functions. · 4d1c9d87
      Corey Farrell authored
      This replaces AST_INLINE_API allocators in utils.h with real functions
      implemented in astmm.c.  Associated macro's are also moved from utils.h
      to astmm.h.
      
      Remove menuselect conflicts between MALLOC_DEBUG and DEBUG_CHAOS as they
      can now be combined.
      
      This has multiple benefits:
      * Simplifies asterisk/utils.h by removing inline functions and use of
        the logger.
      * Removal of these inline functions decreases size of Asterisk and
        module binaries by 1% or more.
      * Puts memory management functions together with and without
        MALLOC_DEBUG enabled, simplifying management of the code.
      * Enables DEBUG_CHAOS for ASTMM_REDIRECT and bundled pjproject.
      
      Change-Id: If9df4377f74bdbb627461b27a473123e05525887
      4d1c9d87
  7. Dec 22, 2017
  8. Feb 23, 2017
    • frahaase's avatar
      Binaural synthesis (confbridge): Adds binaural synthesis to bridge_softmix. · 094c26aa
      frahaase authored
      Adds binaural synthesis to bridge_softmix (via convolution using libfftw3).
      Binaural synthesis is conducted at 48kHz.
      For a conference, only one spatial representation is rendered.
      The default rendering is applied for mono-capable channels.
      
      ASTERISK-26292
      
      Change-Id: Iecdb381b6adc17c961049658678f6219adae1ddf
      094c26aa
  9. Feb 15, 2017
  10. May 05, 2015
    • Corey Farrell's avatar
      Modules: Make ast_module_info->self available to auxiliary sources. · a8bfa9e1
      Corey Farrell authored
      ast_module_info->self is often needed to register items with the core.  Many
      modules have ad-hoc code to make this pointer available to auxiliary sources.
      This change updates the module build process to make the needed information
      available to all sources in a module.
      
      ASTERISK-25056 #close
      Reported by: Corey Farrell
      
      Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
      a8bfa9e1
  11. Mar 28, 2015
  12. Apr 11, 2014
  13. Mar 21, 2014
  14. Aug 02, 2013
  15. May 02, 2013
  16. Nov 16, 2012
    • Automerge script's avatar
      Merged revisions 376341,376344-376345 via svnmerge from · e8898ec8
      Automerge script authored
      file:///srv/subversion/repos/asterisk/trunk
      
      ................
        r376341 | dlee | 2012-11-15 18:08:00 -0600 (Thu, 15 Nov 2012) | 34 lines
        
        Migrate hashtest/hashtest2 to be unit tests.
        
        Both hashtest and hashtest2 are manual testing apps that thrash hash
        tables (hashtab and ao2 containers, respectively), by spinning up
        several threads that randomly insert, delete, lookup and iterate over
        the hash table. If the app doesn't crash, the hash table probably passes
        the test. Those utils are not a part of the typical Asterisk build, so
        they do not usually get compiled. This all makes them less that useful.
        
        This patch removes those manual test programs and replaces them with
        Asterisk unit test modules (test_{hashtab,astobj2}_thrash.so). It also
        attempts to make the tests more deterministic.
        
        * Rather than spinning up some number of threads that operate on the
          hash table randomly, spin up four threads that concurrenly add,
          remove, lookup and iterate over the hash table.
        * Each thread checks the state of the hash table both during and after
          execution, and indicates a test failure if things are not as expected.
        * Each thread times out after 60 seconds to prevent deadlocking the unit
          test run.
        
        (closes issue ASTERISK-20505)
        Reported by: Matt Jordan
        Review: https://reviewboard.asterisk.org/r/2189/
        ........
        
        Merged revisions 376306 from http://svn.asterisk.org/svn/asterisk/branches/1.8
        ........
        
        Merged revisions 376315 from http://svn.asterisk.org/svn/asterisk/branches/10
        ........
        
        Merged revisions 376339 from http://svn.asterisk.org/svn/asterisk/branches/11
      ................
        r376344 | dlee | 2012-11-15 18:14:00 -0600 (Thu, 15 Nov 2012) | 1 line
        
        Somehow I put in svn-1.6 merge information. Oops.
      ................
        r376345 | dlee | 2012-11-15 18:15:30 -0600 (Thu, 15 Nov 2012) | 15 lines
        
        Fixed extconf.c breakage introduced in r376306.
        
        To quote wdoekes:
        > Note that I'm not confirming legitimacy of having that file in tree at
        > all. Is anyone using aelparse/conf2ael?
        ........
        
        Merged revisions 376340 from http://svn.asterisk.org/svn/asterisk/branches/1.8
        ........
        
        Merged revisions 376342 from http://svn.asterisk.org/svn/asterisk/branches/10
        ........
        
        Merged revisions 376343 from http://svn.asterisk.org/svn/asterisk/branches/11
      ................
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e8898ec8
    • David M. Lee's avatar
      Migrate hashtest/hashtest2 to be unit tests. · 752ffc69
      David M. Lee authored
      Both hashtest and hashtest2 are manual testing apps that thrash hash
      tables (hashtab and ao2 containers, respectively), by spinning up
      several threads that randomly insert, delete, lookup and iterate over
      the hash table. If the app doesn't crash, the hash table probably passes
      the test. Those utils are not a part of the typical Asterisk build, so
      they do not usually get compiled. This all makes them less that useful.
      
      This patch removes those manual test programs and replaces them with
      Asterisk unit test modules (test_{hashtab,astobj2}_thrash.so). It also
      attempts to make the tests more deterministic.
      
      * Rather than spinning up some number of threads that operate on the
        hash table randomly, spin up four threads that concurrenly add,
        remove, lookup and iterate over the hash table.
      * Each thread checks the state of the hash table both during and after
        execution, and indicates a test failure if things are not as expected.
      * Each thread times out after 60 seconds to prevent deadlocking the unit
        test run.
      
      (closes issue ASTERISK-20505)
      Reported by: Matt Jordan
      Review: https://reviewboard.asterisk.org/r/2189/
      ........
      
      Merged revisions 376306 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 376315 from http://svn.asterisk.org/svn/asterisk/branches/10
      ........
      
      Merged revisions 376339 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      752ffc69
  17. Oct 14, 2012
  18. Oct 10, 2011
  19. Aug 17, 2011
  20. Jul 06, 2011
    • Terry Wilson's avatar
      Replace Berkeley DB with SQLite 3 · efd040cd
      Terry Wilson authored
      There were some bugs in the very ancient version of Berkeley DB that Asterisk
      used. Instead of spending the time tracking down the bugs in the Berkeley code
      we move to the much better documented SQLite 3.
      
      Conversion of the old astdb happens at runtime by running the included
      astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave
      identically to the old Berkeley backend, but in the future we could offer a
      much more robust interface.
      
      We do not include the SQLite 3 library in the source tree, but instead rely
      upon the distribution-provided libraries. SQLite is so ubiquitous that this
      should not place undue burden on administrators.
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      efd040cd
  21. Apr 22, 2010
  22. Mar 25, 2010
  23. Mar 16, 2010
  24. Oct 22, 2009
  25. Jul 21, 2009
    • Kevin P. Fleming's avatar
      Merged revisions 207647 via svnmerge from · 96e4e31e
      Kevin P. Fleming authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
        
        Ensure that user-provided CFLAGS and LDFLAGS are honored.
        
        This commit changes the build system so that user-provided flags (in ASTCFLAGS
        and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
        by the build system itself, so that the user can effectively override the
        build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
        be provided *either* in the environment before running 'make', or as variable
        assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
        is no longer necessary, so they are no longer documented, but are still supported
        so as not to break existing build systems that supply them when building Asterisk.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      96e4e31e
  26. Apr 09, 2009
  27. Mar 25, 2009
  28. Mar 11, 2009
    • Jeff Peeler's avatar
      Fix malloc debug macros to work properly with h323. · 58cf8b69
      Jeff Peeler authored
      The main problem here was that cstdlib was undefining free thereby causing the
      proper debug macros to not be used. ast_h323.cxx has been changed to call
      ast_free instead to avoid the issue. 
      
      A few other issues were addressed:
      - There were a few instances of functions improperly passing ast_free instead
      of ast_free_ptr.
      - Some clean up was done to avoid the debug macros intentionally being redefined.
      (copied below from Kevin's commit, appreciate the help)
      - disable astmm.h from doing anything when STANDALONE is defined, which is used
      by the tools in the utils/ directory that use parts of Asterisk header files in
      hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are
      compiled with STANDALONE defined.
      
      (closes issue #13593)
      Reported by: pj
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      58cf8b69
  29. Mar 03, 2009
    • Steve Murphy's avatar
    • Steve Murphy's avatar
      Merged revisions 179807 via svnmerge from · f47b0387
      Steve Murphy authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      I had some work to do to port these changes to trunk; the 
      check_expr stuff hasn't been updated here for quite some
      time, it appears. I added some more tests to the check_expr2
      suite. I had to play around with the makefile a bit, etc.
      
      I added STANDALONE2 #ifdefs to ast_expr2.y so as not to
      conflict structure with aelparse.
      
      ........
        r179807 | murf | 2009-03-03 11:11:34 -0700 (Tue, 03 Mar 2009) | 19 lines
        
        These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text.
        
        I modified and added rules in ast_expr2.fl to better handle
        the concatenations.
        
        I added some default routines to ast_expr2.y so the standalone would
        compile. It also looks like I haven't run this thru bison since 2.1, so
        it's good to get this updated.
        
        The Makefile has comments added now for check_expr2 and check_expr to
        explain what they are for, and how to run them. 
        
        The testexpr2s stuff has been removed, in favor of check_expr2.
        
        expr2.testinput has been updated to include the two expressions
        that inspired these changes (from mcnobody on #asterisk this morning)
        The regression has been run and all looks well.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f47b0387
  30. Dec 17, 2008
    • Steve Murphy's avatar
      A possibly "horrible fix" for a "horribly broken" · 1a37ee40
      Steve Murphy authored
      situation.
      
      As stuff shifts around in the asterisk code, the
      miscellaneous inclusions from the standalone stuff
      gets broken. There's no easy fix for this situation.
      
      I made sure that everything in utils builds without
      problem ***AND*** that aelparse runs the regressions
      correctly with the following make menuselect options
      both on and off:
      
      DONT_OPTIMIZE
      DEBUG_THREADS
      DEBUG_CHANNEL_LOCKS
      MALLOC_DEBUG
      MTX_PROFILE
      DEBUG_SCHEDULER
      DEBUG_THREADLOCALS
      DETECT_DEADLOCKS
      CHANNEL_TRACE
      
      I think from now on, I'm going to #undef
      all these features in the various utils native
      files; I guess I could do the same for the
      copied-in files, surrounded by STANDALONE ifdef.
      
      A standalone isn't going to care about threads,
      mutexes, etc.
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1a37ee40
  31. Dec 13, 2008
  32. Nov 26, 2008
  33. Oct 08, 2008
  34. Oct 06, 2008
  35. Sep 27, 2008
Loading