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


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

Submitted by:  Nick Markham <nmarkham>
Submitted on:  Mon 27 Jan 2014 08:39:52 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

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


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>
Project 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 File(s):

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
  • -unavailable- added by bettini (Posted a comment)
  • -unavailable- added by nmarkham (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):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 20 Feb 2014 09:12:40 PM UTCnmarkhamAttached File-=>Added gengetopt-bug-41369.patch, #30619

    Back to the top

    Powered by Savane 3.1-cleanup1