radium segfaults on reading command line options

Carter Bullard via Argus-info argus-info at lists.andrew.cmu.edu
Fri May 6 10:45:01 EDT 2016


Hey Richard,
Hmmmm, yep that is a ‘cut copy paste’ bug.    optarg is a global variable that you get from the getopt.3 facility.
Because overriding global variables with local defines is a common practice, this type of error can be tough to see.

Your fix:
                 if (isdigit((int) *mode->mode))
                   setArgusMarReportInterval (ArgusParser, mode->mode);

Is how I would fix it, so … excellent !! I have put in the fix for this bug which will be in the new release.
Thanks !!!!!
Carter


> On May 5, 2016, at 11:34 PM, Richard Rothwell via Argus-info <argus-info at lists.andrew.cmu.edu> wrote:
> 
> Hi Carter
> 
> 
> 
> This command line used to work, but now it segfaults as follows:
> 
> /usr/local/sbin/radium -S cisco://any:9012 -d -e 12 -P 562 -M 60 -- local dur lte 300
> 
> 
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000405511 in ArgusClientInit (parser=0x7ffff7eab010) at ./radium.c:117
> 117	               if (isdigit(*optarg))
> 
> I have submitted a bug via your bug reporter.
> 
> I am not even sure why it compiles as I can’t locate the definition of optarg.
> Elsewhere its a local variable, but here it seems to be a global without a definition. 
> 
> Regards from Richard
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20160506/0cbf822c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6285 bytes
Desc: not available
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20160506/0cbf822c/attachment.bin>


More information about the argus mailing list