summaryrefslogtreecommitdiff
path: root/utils/check_expr.c
AgeCommit message (Collapse)Author
2008-12-17A possibly "horrible fix" for a "horribly broken"Steve Murphy
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
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29incorporates r159808 from branches/1.4:Kevin P. Fleming
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29Avoid build warning when execinfo.h isn't available.Sean Bright
(closes issue #12751) Reported by: ys Patches: check_expr.diff uploaded by ys (license 281) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-28Fix a linkage error related to the lock backtrace supportRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23A new feature thanks to the fine folks at Switchvox!Mark Michelson
If a deadlock is detected, then the typical lock information will be printed along with a backtrace of the stack for the offending threads. Use of this requires compiling with DETECT_DEADLOCKS and having glibc installed. Furthermore, issuing the "core show locks" CLI command will print the normal lock information as well as a backtraces for each lock. This requires that DEBUG_THREADS is enabled and that glibc is installed. All the backtrace features may be disabled by running the configure script with --without-execinfo as an argument git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10Merged revisions 114051 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114051 | mmichelson | 2008-04-10 15:59:49 -0500 (Thu, 10 Apr 2008) | 3 lines Fix 1.4 build when LOW_MEMORY is enabled. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Go through and fix a bunch of places where character strings were being ↵Terry Wilson
interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28Merged revisions 105116 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r105116 | russell | 2008-02-28 16:23:05 -0600 (Thu, 28 Feb 2008) | 8 lines Fix a bug in the lock tracking code that was discovered by mmichelson. The issue is that if the lock history array was full, then the functions to mark a lock as acquired or not would adjust the stats for whatever lock is at the end of the array, which may not be itself. So, do a sanity check to make sure that we're updating lock info for the proper lock. (This explains the bizarre stats on lock #63 in BE-396, thanks Mark!) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10Add ast_atomic_fetchadd_int_slow to check_expr for platforms that need it.Joshua Colp
(closes issue #11484) Reported by: snuffy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26closes issue #11341; made changes to make utils again right with the ↵Steve Murphy
MTX_PROFILE world. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21more header removal/normalizationLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17and then, I noticed the clicompat stuff.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17more stub routines to allow linkage in stand-alone environment, with thread ↵Steve Murphy
debugs turned on git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09Remove redundant includes (patch by snuffy) (Closes issue #10922)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-08Fix up tree so that it compiles when MTX Profiling is enabled.Joshua Colp
(closes issue #10898) Reported by: snuffy Patches: 10898-mtx_prof.diff uploaded by qwell (license 4) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01OK. THis a DEBUG_THREADS situation.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01picky gcc versions... sigh.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01This mod will allow check_expr to compile in the presence of DEBUG_THREAD ↵Steve Murphy
situations. At least, it does for me. And it's less expensive than several other approaches I tried. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22Ensure that the object code for ast_atomic_fetchadd_int() gets included in theRussell Bryant
check_expr binary when building with LOW_MEMORY defined. (reported by Brian Capouch on the asterisk-dev list, patch by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15This commit closes bug 7605, and half-closes 7638. The AEL code has been ↵Steve Murphy
redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵Steve Murphy
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05In regards to changes for 9508, expr2 system choking on floating point ↵Steve Murphy
numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24Merged revisions 52052 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r52052 | murf | 2007-01-24 11:26:22 -0700 (Wed, 24 Jan 2007) | 9 lines Merged revisions 52002 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r52002 | murf | 2007-01-24 10:43:50 -0700 (Wed, 24 Jan 2007) | 1 line updated check_expr via 8322 (refactoring of expression checking impl); elfring contributed a nice code reorg, I contributed some time to get it working again, better messages ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-06check for failure after call to calloc() (issue #8295)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-29don't make expression evaluator allocate a memory buffer for each resultKevin P. Fleming
to be returned; use the buffers already present in the PBX for this purpose update testexpr2/check_expr to allocate buffers for expression evaluation git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-21enhance check_expr to check for parsing errors in dialplans (bug #4556)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-09add tool to check extensions.conf files for problems with new expression ↵Kevin P. Fleming
parser (bug #4491) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5886 65c4cc65-6c06-0410-ace0-fbb531ad65f3