Summary: | ASTERISK-12020: [patch] Warn when a string of "(null)" is passed to ast_strlen_zero | ||
Reporter: | Tilghman Lesher (tilghman) | Labels: | |
Date Opened: | 2008-05-14 13:13:05 | Date Closed: | 2008-05-15 17:01:29 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/BuildSystem |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20080514__warning.diff.txt ( 1) ast_assert.rev4.txt | |
Description: | Found one of these cases before, thought it might be a good idea to add code (for dev-mode only) to detect additional cases in the future. | ||
Comments: | By: Russell Bryant (russell) 2008-05-14 15:59:48 I would like to propose adding an ast_assert() to be used for this, and other similar type things. See attached patch. By: Digium Subversion (svnbot) 2008-05-14 16:26:04 Repository: asterisk Revision: 116463 U branches/1.4/channels/chan_agent.c U branches/1.4/include/asterisk/channel.h U branches/1.4/include/asterisk/utils.h U branches/1.4/main/abstract_jb.c U branches/1.4/main/channel.c U branches/1.4/main/rtp.c U branches/1.4/main/sched.c U branches/1.4/main/udptl.c ------------------------------------------------------------------------ r116463 | russell | 2008-05-14 16:26:03 -0500 (Wed, 14 May 2008) | 4 lines Add ast_assert(), which can be used to handle fatal errors. It is only compiled in if dev-mode is enabled, and only aborts if DO_CRASH is defined. (inspired by issue ASTERISK-12020) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=116463 By: Digium Subversion (svnbot) 2008-05-14 16:34:51 Repository: asterisk Revision: 116469 _U trunk/ U trunk/channels/chan_agent.c U trunk/include/asterisk/channel.h U trunk/include/asterisk/utils.h U trunk/main/abstract_jb.c U trunk/main/channel.c U trunk/main/rtp.c U trunk/main/sched.c U trunk/main/udptl.c ------------------------------------------------------------------------ r116469 | russell | 2008-05-14 16:34:50 -0500 (Wed, 14 May 2008) | 12 lines Merged revisions 116463 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines Add ast_assert(), which can be used to handle fatal errors. It is only compiled in if dev-mode is enabled, and only aborts if DO_CRASH is defined. (inspired by issue ASTERISK-12020) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=116469 By: Digium Subversion (svnbot) 2008-05-14 16:35:11 Repository: asterisk Revision: 116470 _U branches/1.6.0/ U branches/1.6.0/channels/chan_agent.c U branches/1.6.0/include/asterisk/channel.h U branches/1.6.0/include/asterisk/utils.h U branches/1.6.0/main/abstract_jb.c U branches/1.6.0/main/channel.c U branches/1.6.0/main/rtp.c U branches/1.6.0/main/sched.c U branches/1.6.0/main/udptl.c ------------------------------------------------------------------------ r116470 | russell | 2008-05-14 16:35:11 -0500 (Wed, 14 May 2008) | 20 lines Merged revisions 116469 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r116469 | russell | 2008-05-14 16:40:43 -0500 (Wed, 14 May 2008) | 12 lines Merged revisions 116463 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines Add ast_assert(), which can be used to handle fatal errors. It is only compiled in if dev-mode is enabled, and only aborts if DO_CRASH is defined. (inspired by issue ASTERISK-12020) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=116470 By: Digium Subversion (svnbot) 2008-05-15 16:59:45 Repository: asterisk Revision: 116694 U trunk/include/asterisk/strings.h U trunk/include/asterisk/utils.h ------------------------------------------------------------------------ r116694 | tilghman | 2008-05-15 16:59:44 -0500 (Thu, 15 May 2008) | 4 lines Add an extra check in ast_strlen_zero, and make ast_assert() not print the file, line, and function name twice. (Closes issue ASTERISK-12020) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=116694 By: Digium Subversion (svnbot) 2008-05-15 17:01:29 Repository: asterisk Revision: 116695 _U branches/1.6.0/ U branches/1.6.0/include/asterisk/strings.h U branches/1.6.0/include/asterisk/utils.h ------------------------------------------------------------------------ r116695 | tilghman | 2008-05-15 17:01:27 -0500 (Thu, 15 May 2008) | 12 lines Merged revisions 116694 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r116694 | tilghman | 2008-05-15 17:05:47 -0500 (Thu, 15 May 2008) | 4 lines Add an extra check in ast_strlen_zero, and make ast_assert() not print the file, line, and function name twice. (Closes issue ASTERISK-12020) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=116695 |