bugGNU Gengetopt - Bugs: bug #41369, SIGABRT and core dump for...

 
 

bug #41369: SIGABRT and core dump for nonexistent --output-dir

Submitter:  Nick Markham <nmarkham>
Submitted:  Mon 27 Jan 2014 08:39:52 PM UTC
   
 
Category:  None Severity:  2 - Minor
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  gscano
Originator Name:  Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 27 Nov 2020 06:14:23 AM UTC, comment #4: 

Patch merged, thanks!

Grégoire Scano <gscano>
Group Member
Thu 20 Feb 2014 09:13:52 PM UTC, comment #3: 

Attached a patch to the bug.  (I hope that's the right way to submit one?)

Nick Markham <nmarkham>
Fri 14 Feb 2014 05:46:48 PM UTC, comment #2: 

mh... probably you're right, and that might be code written a few time ago; I'll try to address this issue, but I can't promise I can do right now.  Patches are more than welcome :)

Lorenzo Bettini <bettini>
Group administrator
Mon 27 Jan 2014 09:04:40 PM UTC, comment #1: 

After a brief investigation, I see that this seems to be intentional: fileutils.cpp:52 calls abort() directly.  I'm wondering if there's a reason for this?  Personally, I would've expected a non-zero return value and a message on standard error, but not a signal nor core dump for something like this.

Nick Markham <nmarkham>
Mon 27 Jan 2014 08:39:52 PM UTC, original submission:  

Looks like a bit of additional error checking is needed:

$ gengetopt --output-dir=does-not-exist </dev/null
Error creating does-not-exist/cmdline.h
Aborted (core dumped)

This also applies, unsurprisingly, to --src-output-dir and --header-output-dir.  I also verified that an unwriteable directory produces the same issue

Nick Markham <nmarkham>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30619:  gengetopt-bug-41369.patch added by nmarkham (428B - application/octet-stream - Patch containing suggested fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gscano (Posted a comment)
  • -email is unavailable- added by bettini (Posted a comment)
  • -email is unavailable- added by nmarkham (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-27 gscano Severity3 - Normal 2 - Minor
        StatusConfirmed Fixed
        Assigned toNone gscano
    2019-05-30 gray_wolf Assigned togray_wolf None
    2019-05-19 gray_wolf Assigned toNone gray_wolf
    2019-05-19 gray_wolf StatusNone Confirmed
    2014-02-20 nmarkham Attached File- Added gengetopt-bug-41369.patch, #30619

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code