bugGNU Gengetopt - Bugs: bug #35682, segfault when modeoption are used...

 
 

bug #35682: segfault when modeoption are used together with --long-help

Submitted by:  Ruediger Meier <rudimeier>
Submitted on:  Thu 01 Mar 2012 07:06:59 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Tim Marston <edam>
Originator Name: Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 02 Mar 2012 11:09:46 AM UTC, comment #2:

Yes, tested 2.22.4, 2.22.5 and latest HEAD (on openSUSE 11.4).

Should be easy to reproduce. If not I could send a coredump.
Here the backtrace (bla.ggo was the one from first comment):

rudi@zappa:/tmp/gengetopt> git show-ref HEAD
95495b902d6b60559858cfd888e7065ac5e21601 refs/remotes/origin/HEAD
[...]
Core was generated by `./src/gengetopt -i /tmp/bla.ggo'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f0eab5db7e2 in __strlen_sse2 () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f0eab5db7e2 in __strlen_sse2 () from /lib64/libc.so.6
#1 0x000000000040b859 in length (__lhs=0x0, __rhs=...) at /usr/include/c++/4.5/bits/char_traits.h:263
#2 std::operator+<char, std::char_traits<char>, std::allocator<char> > (__lhs=0x0, __rhs=...) at /usr/include/c++/4.5/bits/basic_string.tcc:698
#3 0x000000000041e647 in CmdlineParserCreator::generate_usage_string (this=<value optimized out>, use_config_package=<value optimized out>) at ../../src/gm.cc:714
#4 0x000000000041e842 in CmdlineParserCreator::generate_source (this=0x7fff260b3330) at ../../src/gm.cc:1956
#5 0x0000000000406ae5 in main (argc=0, argv=<value optimized out>) at ../../src/gengetopt.cc:323

Ruediger Meier <rudimeier>
Fri 02 Mar 2012 08:10:41 AM UTC, comment #1:

Have you tried with the current sources from git also?

Lorenzo Bettini <bettini>
Project Administrator
Thu 01 Mar 2012 07:06:59 PM UTC, original submission:

Hi

This snippet lets gengetopt (2.22.5) die painful:
------------
# "--long-help" works only if package is uncommented
args "--long-help"
#package "test_modes"

section "some section"
defmode "mode x"
modeoption "optc" - "string c" mode="mode x" optional
-------------

Ruediger Meier <rudimeier>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by edam (Updated the item)
  • -unavailable- added by bettini (Posted a comment)
  • -unavailable- added by rudimeier (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 17 Jul 2012 04:31:08 PM UTCedamStatusNone=>Fixed
      Assigned toNone=>edam
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1