Skip to content

Malformed rule shouldn't cause a core dump #27

Open
@eeijlar

Description

@eeijlar

Malformed rules shouldn't cause a core dump, it should just be an error, and the program should exit.

This was caused by a typo, in the rule set, instead of 'end match', I had 'emd match'

(gdb) bt
#0  0x00007f9fa3cbc1d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f9fa3cbd8c8 in __GI_abort () at abort.c:90
#2  0x00007f9fa4af57b4 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2323
#3  0x00007f9fa4af5959 in qt_message(enum QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg,
    msg=msg@entry=0x4386a0 "Malformed line in rules file: line %d: %s", ap=ap@entry=0x7fff88320fb0) at global/qglobal.cpp:2369
#4  0x00007f9fa4af6261 in qFatal (msg=msg@entry=0x4386a0 "Malformed line in rules file: line %d: %s") at global/qglobal.cpp:2552
#5  0x000000000040d285 in Rules::load (this=0x1191aa0, filename=...) at ruleparser.cpp:317
#6  0x000000000040ff8b in load (this=<optimized out>) at ruleparser.cpp:124
#7  RulesList::load (this=this@entry=0x7fff88321b60) at ruleparser.cpp:39
#8  0x0000000000407209 in main (argc=6, argv=<optimized out>) at main.cpp:195
(gdb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions